Skip to main content

Retrieve pre-trained models and cache it locally

Project description

retrieve

Code Sample

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

retrieve-0.0.6.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

retrieve-0.0.6-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file retrieve-0.0.6.tar.gz.

File metadata

  • Download URL: retrieve-0.0.6.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for retrieve-0.0.6.tar.gz
Algorithm Hash digest
SHA256 78912f9d6e60c34555a0d6ba95dc315ed408543d6c5b39a04f7528949203cde5
MD5 0369def0b570ae201502d28ec8c5b9ed
BLAKE2b-256 012f240197129d0ef9be089eed65cd52d8ee639e10c5c7a736dbb83a66c06240

See more details on using hashes here.

File details

Details for the file retrieve-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: retrieve-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for retrieve-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8e392a939cdb3021d4f9c104d80c1e4ab75d4082b5679568305221d480a4271e
MD5 baee16c1e61717ef1cf4384d439d7edc
BLAKE2b-256 4ffef5a77a8efba1ccbfdbf577f72469e94dcf637d91b991fb6b02055cec7fb6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page