Skip to main content

A wrapper around huggingface datasets, invoking an IPFS model manager.

Project description

IPFS Model Manager

This is a model manager and wrapper for huggingface, and it maintains an index of models from collections of models store retrieved through local/https/s3/ipfs/orbitdb, then maintains a state of which what models are currently accesible, and it will choose what files should be cached through local/s3/ipfs/ based on configuration settings.

How to use

pip install .

look run python3 example.py for examples of usage.

this is designed to be a drop in replacement, which requires only 2 lines to be changed

In your python script

from ipfs_kit import ipfs_kit
from orbitdb_kit import orbitdb_kit 
from ipfs_model_manager import ipfs_model_manager as model_manager
from ipfs_model_manager import load_config()
from ipfs_model_manager import load_collection()
config = load_config()
collection = load_collection()
models = ModelManager()
ready = models.ready()
models.import_config(config)
models.import_collection(collection)
models.state()

or

from ipfs_kit import ipfs_kit
from orbitdb_kit import orbitdb_kit 
from ipfs_model_manager import ipfs_model_manager as model_manager
from ipfs_model_manager import load_config()
from ipfs_model_manager import load_collection()
config = load_config()
config.s3cfg = {
        "bucket": "cloud",
        "endpoint": "https://storage.googleapis.com",
        "secret_key": "",
        "access_key": ""
    }
collection = load_collection()
models = ModelManager()
ready = models.ready()
models.import_config(config)
models.import_collection(collection)
models.state()

IPFS Huggingface Bridge:

for huggingface transformers python library visit: https://github.com/endomorphosis/ipfs_transformers/

for huggingface datasets python library visit: https://github.com/endomorphosis/ipfs_datasets/

for faiss KNN index python library visit: https://github.com/endomorphosis/ipfs_faiss

for transformers.js visit:
https://github.com/endomorphosis/ipfs_transformers_js

for orbitdb_kit nodejs library visit: https://github.com/endomorphosis/orbitdb_kit/

for fireproof_kit nodejs library visit: https://github.com/endomorphosis/fireproof_kit

for ipfs_kit python library visit: https://github.com/endomorphosis/ipfs_kit/

for ipfs_kit_js nodejs library visit: https://github.com/endomorphosis/ipfs_kit_js

for python model manager library visit: https://github.com/endomorphosis/ipfs_model_manager/

for nodejs model manager library visit: https://github.com/endomorphosis/ipfs_model_manager_js/

for nodejs ipfs huggingface scraper with pinning services visit: https://github.com/endomorphosis/ipfs_huggingface_scraper/

for ipfs agents visit: https://github.com/endomorphosis/ipfs_agents/

for ipfs accelerate visit: https://github.com/endomorphosis/ipfs_accelerate/

Author - Benjamin Barber QA - Kevin De Haan

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

ipfs_model_manager_py-0.0.18.tar.gz (35.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipfs_model_manager_py-0.0.18-py3-none-any.whl (35.3 MB view details)

Uploaded Python 3

File details

Details for the file ipfs_model_manager_py-0.0.18.tar.gz.

File metadata

  • Download URL: ipfs_model_manager_py-0.0.18.tar.gz
  • Upload date:
  • Size: 35.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for ipfs_model_manager_py-0.0.18.tar.gz
Algorithm Hash digest
SHA256 b607292684b0f36a277fdc63e8626bdcfdc352d95d7db51c0986574612cdbd82
MD5 6a9fd2c905fd60b3316b01debf602b11
BLAKE2b-256 f55c8d07f6e519d70419e9ae3d03392ba3071e2b11e332a6a61b0559b1007f7e

See more details on using hashes here.

File details

Details for the file ipfs_model_manager_py-0.0.18-py3-none-any.whl.

File metadata

File hashes

Hashes for ipfs_model_manager_py-0.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 61b7423360def78856935a7c4701a5285eb303b2b9691f9b6c9332456b5afc1f
MD5 ec8c42a00b45af767917694b3cf84e88
BLAKE2b-256 5fe5972fda661ce5b7a8fab0b47b1240f5d8dcd5aaef4a931fd72b42ab373381

See more details on using hashes here.

Supported by

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