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

Update den auth default to None in cluster factory #784

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion runhouse/resources/hardware/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __init__(

self.ips = ips
self.client = None
self.den_auth = den_auth
self.den_auth = den_auth or False
self.cert_config = TLSCertConfig(cert_path=ssl_certfile, key_path=ssl_keyfile)

self.ssl_certfile = ssl_certfile
Expand Down
13 changes: 7 additions & 6 deletions runhouse/resources/hardware/cluster_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def cluster(
ssl_keyfile: str = None,
ssl_certfile: str = None,
domain: str = None,
den_auth: bool = False,
den_auth: bool = None,
default_env: Union["Env", str] = None,
dryrun: bool = False,
**kwargs,
Expand Down Expand Up @@ -55,7 +55,7 @@ def cluster(
domain(str, optional): Domain name for the cluster. Relevant if enabling HTTPs on the cluster.
den_auth (bool, optional): Whether to use Den authorization on the server. If ``True``, will validate incoming
requests with a Runhouse token provided in the auth headers of the request with the format:
``{"Authorization": "Bearer <token>"}``. (Default: ``False``).
``{"Authorization": "Bearer <token>"}``. (Default: ``None``).
default_env (Env or str, optional): Environment that the Runhouse server is started on in the cluster. Used to
specify an isolated environment (e.g. conda env) or any setup and requirements prior to starting the Runhouse
server. (Default: ``None``)
Expand Down Expand Up @@ -99,6 +99,7 @@ def cluster(
ssl_keyfile=ssl_keyfile,
ssl_certfile=ssl_certfile,
domain=domain,
den_auth=den_auth,
default_env=default_env,
kwargs=kwargs if len(kwargs) > 0 else None,
)
Expand Down Expand Up @@ -315,7 +316,7 @@ def ondemand_cluster(
ssl_keyfile: str = None,
ssl_certfile: str = None,
domain: str = None,
den_auth: bool = False,
den_auth: bool = None,
default_env: Union["Env", str] = None,
dryrun: bool = False,
**kwargs,
Expand Down Expand Up @@ -354,7 +355,7 @@ def ondemand_cluster(
domain(str, optional): Domain name for the cluster. Relevant if enabling HTTPs on the cluster.
den_auth (bool, optional): Whether to use Den authorization on the server. If ``True``, will validate incoming
requests with a Runhouse token provided in the auth headers of the request with the format:
``{"Authorization": "Bearer <token>"}``. (Default: ``False``).
``{"Authorization": "Bearer <token>"}``. (Default: ``None``).
default_env (Env or str, optional): Environment that the Runhouse server is started on in the cluster. Used to
specify an isolated environment (e.g. conda env) or any setup and requirements prior to starting the Runhouse
server. (Default: ``None``)
Expand Down Expand Up @@ -482,7 +483,7 @@ def sagemaker_cluster(
ssl_keyfile: str = None,
ssl_certfile: str = None,
domain: str = None,
den_auth: bool = False,
den_auth: bool = None,
default_env: Union["Env", str] = None,
dryrun: bool = False,
**kwargs,
Expand Down Expand Up @@ -538,7 +539,7 @@ def sagemaker_cluster(
domain(str, optional): Domain name for the cluster. Relevant if enabling HTTPs on the cluster.
den_auth (bool, optional): Whether to use Den authorization on the server. If ``True``, will validate incoming
requests with a Runhouse token provided in the auth headers of the request with the format:
``{"Authorization": "Bearer <token>"}``. (Default: ``False``).
``{"Authorization": "Bearer <token>"}``. (Default: ``None``).
default_env (Env or str, optional): Environment that the Runhouse server is started on in the cluster. Used to
specify an isolated environment (e.g. conda env) or any setup and requirements prior to starting the Runhouse
server. (Default: ``None``)
Expand Down
Loading