Retrieve pre-trained models and cache it locally
Project description
retrieve
No-frills library to download pre-trained models, cache it and return the local path.
Installation
pip install -U retrieve
Motivation
When using pre-trained ML models in your projects, majority of them require you to manually download the data/model weights and then specify the path in your code. Everyone in your team has to go through the same trouble of manually setting this up before they can run your models.
The idea with this library is automate this and make using pre-trained models as easy as possible.
Usage
Pass the pre-trained model path to the retrieve.url(...) method and it will return you a filepath to the file. If the file is not already download, it is fetched and shows a progress of download.
import retrieve
# URL for the pre-trained model
pretrained_model_url = '...'
# Get local path to the pre-trained model
path = retrieve.url(pretrained_model_url)
If source is a zip file, it's automatically extracted out and the extracted folder path is returned.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file retrieve-0.0.7.tar.gz
.
File metadata
- Download URL: retrieve-0.0.7.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44a7d8c4f5bc914c61e2820e3bae480a24c0abfe24f43ee1f60ba6f173ee1acd |
|
MD5 | edbfa90ef1d53e5540d4dbceca51c8c7 |
|
BLAKE2b-256 | 2a988b07e2f2e57f1ac908aada96c94bb14e24c6feb2de784643b5e5c678d266 |
File details
Details for the file retrieve-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: retrieve-0.0.7-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c67a7fa35ce91b741ae1464b8774245e7fdb776f00d2013fd1004e9b50203d48 |
|
MD5 | 003d95d25ab2fa5df0d85aae59ad07bd |
|
BLAKE2b-256 | 96b76565b59dc4158f6686b395c1e40859303a8ae32c85fd8bc98cf593109ea2 |