-
Notifications
You must be signed in to change notification settings - Fork 36
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
Implement Kaggle Cache Resolver #19
Conversation
If we detect we are inside a Kaggle notebook (via the `KAGGLE_KERNEL_RUN_TYPE` env variable), then we call the `AttachDatasourceUsingJwtHandler`. http://b/305947763
|
||
logger.info(f"Mounting files to {cached_path}...") | ||
while not os.path.exists(cached_path): | ||
time.sleep(5) |
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.
Note: This waits until the file is ready. We can add later a separate endpoint to poll for progress. Given that we already show progress in the editor UI, probably not high priority.
A user can always send an interrupt (e.g. ctrl + c or click "stop cell" button in a notebook) if they want to stop the waiting.
@@ -28,6 +34,7 @@ | |||
"error": logging.ERROR, | |||
"critical": logging.CRITICAL, | |||
} | |||
TRUTHY_VALUES = ["true", "1", "t"] |
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.
Is t
sometimes used?
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.
I have seen this for a few env vars in the past.
If we detect we are inside a Kaggle notebook (via the
KAGGLE_KERNEL_RUN_TYPE
env variable), then we call theAttachDatasourceUsingJwtHandler
.Also, I added a
DISABLE_KAGGLE_CACHE
environment variable. If set to a truthy value, the KaggleCacheResolver will be skipped.Next: Call
AttachDatasourceUsingJwtHandler
through the Data Proxy inside internet disabled sessions.http://b/305947763