Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ray Dashboard Host and Port Parameters #207

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions aana/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def connect(
port: int = 8000,
host: str = "127.0.0.1",
address: str = "auto",
dashboard_host: str = "127.0.0.1",
dashboard_port: int = 8265,
show_logs: bool = False,
num_cpus: int | None = None,
num_gpus: int | None = None,
Expand All @@ -84,6 +86,10 @@ def connect(
port (int, optional): The port to run the Aana server on. Defaults to 8000.
host (str, optional): The host to run the Aana server on. Defaults to "127.0.0.1".
address (str, optional): The address of the Ray cluster. Defaults to "auto".
dashboard_host (str, optional): The host to bind the dashboard server to. Can either be
localhost (127.0.0.1) or 0.0.0.0 (available from all interfaces).
By default, this is set to localhost to prevent access from external machines.
dashboard_port (int, optional): The port to bind the dashboard server to. Defaults to 8265.
show_logs (bool, optional): If True, the logs will be shown, otherwise
they will be hidden but can be accessed in the Ray dashboard. Defaults to False.
num_cpus (int, optional): Number of CPUs the user wishes to assign to each
Expand All @@ -100,6 +106,9 @@ def connect(
address=address,
ignore_reinit_error=True,
log_to_driver=show_logs,
include_dashboard=True,
dashboard_host=dashboard_host,
dashboard_port=dashboard_port,
)
except ConnectionError:
# If connection fails, start a new Ray cluster and serve instance
Expand Down
Loading