-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Return a new client with SyftClient.login #8159
Conversation
49a0795
to
9352879
Compare
9352879
to
6224b3e
Compare
will always prompt for email and password if not provided
6224b3e
to
1838f3b
Compare
Co-authored-by: Shubham Gupta <[email protected]>
Co-authored-by: Shubham Gupta <[email protected]>
5d80b3a
to
4f06ec1
Compare
Co-authored-by: Shubham Gupta <[email protected]>
- make email required argument for login - replace login with login_as_guest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @kiendang !!
email=login_credentials.email, | ||
password=login_credentials.password, | ||
cache=cache, | ||
) | ||
if not _client.authed: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is a failed login attempt handled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would return a SyftError
_client = ...
if isinstance(_client, SyftError): return _client
return _client
in both cases we return _client
so that check is not needed here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropped a question about handling failed login attempts. Overall, nice work!
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
6dbe515
to
da90a14
Compare
@kiendang Can we get a changelog example for the
|
@madhavajay where should the changelog example be put in? |
@madhavajay I put the changelog examples in the description of the PR. 1 short concise example to highlight the change and 1 longer fully runnable one. |
@kiendang this is really great work! Thank you for your diligence in addressing all the tests as well. 👏 We are still figuring out how to hand off these kinds of API changes but I think it helps to have some code examples for @IrinaMBejan Pylot team. |
Description
Make
SyftClient.login
return a newSyftClient
instance instead of mutating the currentSyftClient
instance.Short changelog example
Before
After
Before
After
Long changelog example
Before
After
Affected Dependencies
List any dependencies that are required for this change.
How has this been tested?
Checklist