8000 GitHub - sebastien-tetaud/model-registry
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sebastien-tetaud/model-registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Model Registry Library

A Python library for storing and managing machine learning models in MongoDB using GridFS.

Features

  • Store machine learning models in MongoDB's GridFS.
  • Easily connect to MongoDB using MongoDBConnector.

Installation

To install the library locally, follow these steps:

  1. Create your python environment and activate it.

  2. Clone the repository:

    git clone https://github.com/tetaud-sebastien/model-registry
    cd model-registry
    
  3. Install the library:

    pip install -e .

Usage

Connect to the Model Registry

from model_registry.connector import MongoDBConnector
username = "username"
password = "password"
host = "ip_address"
db_name = "db_name"

# Connect to MongoDB
connector = MongoDBConnector(username, password, host, db_name)
client = connector.connect()

Store a Model in the Model Registry

from model_registry.store import store
collection = "your_collection"
model_path = "path/to/model.onnx"
# Metadata for the model
metadata = {
    "project_name": "ssh_mapping",
    "model_architecture": "AutoencoderCNN3D",
    "model_version": "0",
}
# Connect to MongoDB
connector = MongoDBConnector(username, password, host, db_name)
client = connector.connect()


# Store the model in MongoDB GridFS
success = store(client=client, db=db_name, collection=collection, metadata=metadata, model_path=model_path)

Information

Feel free to open an issues whether you want for reporting issues, improving documentation, or contributing code, your input is valuable.

Contact

sebastien.tetaud@esa.int

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0