-
Notifications
You must be signed in to change notification settings - Fork 58
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
feat(fal/auth): add support for Google Colab token retrieval #389
Conversation
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.
Clean PR, nice work @efiop !
def is_google_colab() -> bool: | ||
try: | ||
from IPython import get_ipython | ||
|
||
return "google.colab" in str(get_ipython()) | ||
except ModuleNotFoundError: | ||
return False | ||
except NameError: | ||
return False |
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.
something I did not test yet is if this works with google colab pro as well ? (same with the client)
due to some issues in my country I can't access colab pro
this is how huggingface_hub handles it in case of any issues
https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/utils/_runtime.py#L296
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.
oh, interesting. I think I have access to Pro, so I'll try it out in a sec.
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.
Seems to be working fine in pro.
3.12 tests are hanging up, probably unrelated. Investigating. |
4489d56
to
c384c06
Compare
22ca9a4
to
8d992f1
Compare
Adapting #377 to work with sdk as well.
Kudos @not-lain