Load PyTorch Models

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide

Run the following command:

import frogml

repository = "<REPO_NAME>"
name = "<MODEL_NAME>"
version = "<MODEL_VERSION>"

model = frogml.pytorch.load_model(
    repository=repository,
    model_name=name,
    version=version,
)

Where:

  • <REPO_NAME>: The name of the Artifactory repository where the model is stored

  • <MODEL_NAME>: The unique name of the model you want to download

  • <MODEL_VERSION>: The version number of the model you want to load

For example:

import frogml

repository = "ml-local"
name = "sales-lead-classifier"
version = "1.2.0"

model = frogml.pytorch.load_model(
    repository=repository,
    model_name=name,
    version=version,
)