Kaggle / kagglehub

Python library to access Kaggle resources
Apache License 2.0
49 stars 9 forks source link

Implement cache for downloaded models. #8

Closed rosbo closed 11 months ago

rosbo commented 11 months ago

Default cache directory is ~/.cache/kagglehub. Can be overriden globally by KAGGLEHUB_CACHE env variable. Can be overriden for a single call using the cache_dir parameter.

Also include logic for parsing the model handle.

Next: Implement downloading file on cache miss.

http://b/305947384

rosbo commented 11 months ago

It is failing b/c I am using the EnvironmentVarGuard in the test package.

However, the test package is intended only for internal Python use and is stripped from the Docker python image we use: https://github.com/docker-library/python/issues/277#issuecomment-380419950

I will find another way to set the environment variable cleanly in tests.