Load scikit-learn 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>"

scikit_learn_deserialized_model = frogml.scikit_learn.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 = "customer-churn-predictor"
version = "1.2.0"

scikit_learn_deserialized_model = frogml.scikit_learn.load_model(
    repository=repository,
    model_name=name,
    version=version,
)