Skip to content

Commit

Permalink
Merge branch 'dev' into hide_soft_deleted_datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
jcardonnet authored Jul 23, 2024
2 parents 00bbf27 + 5c8d3a3 commit ccf200d
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 @@ -19,6 +19,7 @@
# relative
from .abstract_server import ServerSideType
from .abstract_server import ServerType
from .client.client import login as sy_login
from .client.client import login_as_guest as sy_login_as_guest
from .protocol.data_protocol import stage_protocol_changes
from .server.datasite import Datasite
Expand Down Expand Up @@ -113,7 +114,17 @@ def login(
if not password:
password = getpass.getpass("Password: ")

return self.client.login(email=email, password=password, **kwargs)
if self.port:
return sy_login(
email=email, password=password, url=self.url, port=self.port
) # type: ignore
elif self.deployment_type == DeploymentType.PYTHON:
guest_client = self.python_server.get_guest_client(verbose=False) # type: ignore
return guest_client.login(email=email, password=password, **kwargs) # type: ignore
else:
raise NotImplementedError(
f"client not implemented for the deployment type:{self.deployment_type}"
)

def register(
self,
Expand Down

0 comments on commit ccf200d

Please sign in to comment.