Skip to content

Commit

Permalink
Merge pull request #9014 from OpenMined/python_node_info
Browse files Browse the repository at this point in the history
Add info message when launching node in Python mode
  • Loading branch information
jcardonnet committed Jul 3, 2024
2 parents d0ee80a + 9147124 commit 37c13d5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/syft/src/syft/orchestra.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
import sys
from typing import Any

# third party
from IPython.display import display

# relative
from .abstract_node import NodeSideType
from .abstract_node import NodeType
Expand All @@ -23,6 +26,7 @@
from .node.server import serve_node
from .protocol.data_protocol import stage_protocol_changes
from .service.response import SyftError
from .service.response import SyftInfo
from .util.util import get_random_available_port

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -305,7 +309,7 @@ def launch(
)

if deployment_type_enum == DeploymentType.PYTHON:
return deploy_to_python(
node_handle = deploy_to_python(
node_type_enum=node_type_enum,
deployment_type_enum=deployment_type_enum,
port=port,
Expand All @@ -326,6 +330,13 @@ def launch(
background_tasks=background_tasks,
debug=debug,
)
display(
SyftInfo(
message=f"You have launched a development node at http://{host}:{node_handle.port}."
+ "It is intended only for local use."
)
)
return node_handle
elif deployment_type_enum == DeploymentType.REMOTE:
return deploy_to_remote(
node_type_enum=node_type_enum,
Expand Down

0 comments on commit 37c13d5

Please sign in to comment.