Skip to content

Commit

Permalink
Merge pull request #8833 from OpenMined/rasswanth/add-deprecation-to-…
Browse files Browse the repository at this point in the history
…hagrid

Add Deprecation Flag to Hagrid
  • Loading branch information
rasswanth-s authored May 17, 2024
2 parents 4fb8177 + c435bc1 commit a4268fa
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 68 deletions.
25 changes: 6 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,11 @@ For Google GKE we need the [`gce` annotation](https://cloud.google.com/kubernete
helm install ... --set ingress.class="gce"
```

## Deploy to a Container Engine or Cloud
## Note:

1. Install our handy 🛵 cli tool which makes deploying a Domain or Gateway server to Docker or VM a one-liner:
`pip install -U hagrid`
🚨 Our deployment tool `Hagrid` has been `Deprecated`. For the updated deployment options kindly refer to

2. Then run our interactive jupyter Install 🧙🏽‍♂️ Wizard<sup>BETA</sup>:
`hagrid quickstart`

3. In the tutorial you will learn how to install and deploy:
`PySyft` = our `numpy`-like 🐍 Python library for computing on `private data` in someone else's `Domain`

`PyGrid` = our 🐳 `docker` / 🐧 `vm` `Domain` & `Gateway` Servers where `private data` lives
- 📚 <a href="https://github.com/OpenMined/PySyft/tree/dev/notebooks/tutorials/deployments">Deployments</a>

## Docs and Support

Expand All @@ -128,10 +121,8 @@ helm install ... --set ingress.class="gce"

# Install Notes

- HAGrid 0.3 Requires: 🐍 `python` 🐙 `git` - Run: `pip install -U hagrid`
- Interactive Install 🧙🏽‍♂️ Wizard<sup>BETA</sup> Requires 🛵 `hagrid`: - Run: `hagrid quickstart`
- PySyft 0.8.1 Requires: 🐍 `python 3.10 - 3.12` - Run: `pip install -U syft`
- PyGrid Requires: 🐳 `docker`, 🦦 `podman` or ☸️ `kubernetes` - Run: `hagrid launch ...`
- PyGrid Requires: 🐳 `docker`, 🦦 `podman` or ☸️ `kubernetes`

# Versions

Expand All @@ -154,13 +145,9 @@ Deprecated:

PySyft and PyGrid use the same `version` and its best to match them up where possible. We release weekly betas which can be used in each context:

PySyft (Stable): `pip install -U syft`
PyGrid (Stable) `hagrid launch ... tag=latest`

PySyft (Beta): `pip install -U syft --pre`
PyGrid (Beta): `hagrid launch ... tag=beta`
PySyft (Stable): `pip install -U syft`

HAGrid is a cli / deployment tool so the latest version of `hagrid` is usually the best.
PySyft (Beta): `pip install -U syft --pre`

# What is Syft?

Expand Down
25 changes: 21 additions & 4 deletions packages/hagrid/hagrid/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
from .git_check import verify_git_installation # noqa

# stdlib
import sys
from typing import Any

# third party
import rich
from rich.text import Text

# relative
from .cli import check_status as check # noqa: F401
from .quickstart_ui import QuickstartUI
from .version import __version__ # noqa: F401
from .wizard_ui import WizardUI

from .orchestra import Orchestra # noqa
console = rich.get_console()
table = rich.table.Table(show_header=False)
table.add_column(justify="center")
table.add_row(
"🚨🚨🚨 Hagrid has been deprecated. 🚨🚨🚨",
style=rich.style.Style(
bold=True,
color="red",
),
)
link = "https://github.com/OpenMined/PySyft/tree/dev/notebooks/tutorials/deployments"
link_text = Text(link, style="link " + link + " cyan")
normal_text = Text("Please refer to ")
normal_text.append(link_text)
normal_text.append(" for the deployment instructions.")
table.add_row(normal_text)
console.print(table)


def module_property(func: Any) -> None:
Expand Down
37 changes: 11 additions & 26 deletions packages/hagrid/hagrid/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
from .quickstart_ui import quickstart_download_notebook
from .rand_sec import generate_sec_random_password
from .stable_version import LATEST_STABLE_SYFT
from .style import RichGroup
from .util import fix_windows_virtualenv_api
from .util import from_url
from .util import shell
Expand All @@ -113,7 +112,7 @@ def get_azure_image(short_name: str) -> str:
raise Exception(f"Image name doesn't exist: {short_name}. Try: default or 0.7.0")


@click.group(cls=RichGroup)
@click.command
def cli() -> None:
pass

Expand Down Expand Up @@ -3457,11 +3456,6 @@ def land(args: tuple[str], **kwargs: Any) -> None:
print("Hagrid land aborted.")


cli.add_command(launch)
cli.add_command(land)
cli.add_command(clean)


@click.command(
help="Show HAGrid debug information", context_settings={"show_default": True}
)
Expand All @@ -3474,9 +3468,6 @@ def debug(args: tuple[str], **kwargs: Any) -> None:
print("\n=================================================================\n\n")


cli.add_command(debug)


DEFAULT_HEALTH_CHECKS = ["host", "UI (βeta)", "api", "ssh", "jupyter"]
HEALTH_CHECK_FUNCTIONS = {
"host": check_host,
Expand Down Expand Up @@ -3819,9 +3810,6 @@ def check_status(
print("Video Explanation: https://youtu.be/BJhlCxerQP4 \n")


cli.add_command(check)


# add Hagrid info to the cli
@click.command(help="Show HAGrid info", context_settings={"show_default": True})
def version() -> None:
Expand All @@ -3830,9 +3818,6 @@ def version() -> None:
print(f"HAGRID_REPO_SHA: {commit_hash()}")


cli.add_command(version)


def run_quickstart(
url: str | None = None,
syft: str = "latest",
Expand Down Expand Up @@ -4074,9 +4059,6 @@ def quickstart_cli(
)


cli.add_command(quickstart_cli, "quickstart")


def display_jupyter_url(url_parts: tuple[str, str, int]) -> None:
url = url_parts[0]
if is_gitpod():
Expand Down Expand Up @@ -4236,9 +4218,6 @@ def dagobah(zip_file: str) -> None:
return run_quickstart(zip_file=zip_file)


cli.add_command(dagobah)


def ssh_into_remote_machine(
host_ip: str,
username: str,
Expand Down Expand Up @@ -4326,9 +4305,6 @@ def ssh(ip_address: str, cmd: str) -> None:
)


cli.add_command(ssh)


# Add hagrid logs command to the CLI
@click.command(
help="Get the logs of the HAGrid node", context_settings={"show_default": True}
Expand Down Expand Up @@ -4401,4 +4377,13 @@ def logs(domain_name: str) -> None: # nosec
+ " [bold green]HAPPY DEBUGGING! 🐛🐞🦗🦟🦠🦠🦠[/bold green]\n "
)

cli.add_command(logs)
# cli.add_command(launch)
# cli.add_command(land)
# cli.add_command(clean)
# cli.add_command(debug)
# cli.add_command(check)
# cli.add_command(version)
# cli.add_command(quickstart_cli, "quickstart")
# cli.add_command(dagobah)
# cli.add_command(ssh)
# cli.add_command(logs)
25 changes: 6 additions & 19 deletions packages/syft/PYPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,11 @@ For Google GKE we need the [`gce` annotation](https://cloud.google.com/kubernete
helm install ... --set ingress.class="gce"
```

## Deploy to a Container Engine or Cloud
## Note:

1. Install our handy 🛵 cli tool which makes deploying a Domain or Gateway server to Docker or VM a one-liner:
`pip install -U hagrid`
🚨 Our deployment tool `Hagrid` has been `Deprecated`. For the updated deployment options kindly refer to

2. Then run our interactive jupyter Install 🧙🏽‍♂️ Wizard<sup>BETA</sup>:
`hagrid quickstart`

3. In the tutorial you will learn how to install and deploy:
`PySyft` = our `numpy`-like 🐍 Python library for computing on `private data` in someone else's `Domain`

`PyGrid` = our 🐳 `docker` / 🐧 `vm` `Domain` & `Gateway` Servers where `private data` lives
- 📚 <a href="https://github.com/OpenMined/PySyft/tree/dev/notebooks/tutorials/deployments">Deployments</a>

## Docs and Support

Expand All @@ -125,10 +118,8 @@ helm install ... --set ingress.class="gce"

# Install Notes

- HAGrid 0.3 Requires: 🐍 `python` 🐙 `git` - Run: `pip install -U hagrid`
- Interactive Install 🧙🏽‍♂️ Wizard<sup>BETA</sup> Requires 🛵 `hagrid`: - Run: `hagrid quickstart`
- PySyft 0.8.1 Requires: 🐍 `python 3.10 - 3.12` - Run: `pip install -U syft`
- PyGrid Requires: 🐳 `docker`, 🦦 `podman` or ☸️ `kubernetes` - Run: `hagrid launch ...`
- PyGrid Requires: 🐳 `docker`, 🦦 `podman` or ☸️ `kubernetes`

# Versions

Expand All @@ -151,13 +142,9 @@ Deprecated:

PySyft and PyGrid use the same `version` and its best to match them up where possible. We release weekly betas which can be used in each context:

PySyft (Stable): `pip install -U syft`
PyGrid (Stable) `hagrid launch ... tag=latest`

PySyft (Beta): `pip install -U syft --pre`
PyGrid (Beta): `hagrid launch ... tag=beta`
PySyft (Stable): `pip install -U syft`

HAGrid is a cli / deployment tool so the latest version of `hagrid` is usually the best.
PySyft (Beta): `pip install -U syft --pre`

# What is Syft?

Expand Down

0 comments on commit a4268fa

Please sign in to comment.