Skip to main content

Artifactory plugin for MLflow for Artifact storage

Project description

Internal Jfrog Artifactory store plugin for MLflow

This repository provides a MLflow plugin that allows users to use a Generic Artifactory repository as the artifact store for MLflow.

Mlflow

Implementation overview

  • artifactory: this package includes the JFrogArtifactRepository class that is used to read and write artifacts from Aliyun OSS storage.
  • setup.py file defines entrypoints that tell MLflow to automatically associate the artifactory URIs with the JFrogArtifactRepository implementation when the artifactory library is installed. The entrypoints are configured as follows:
entry_points={
        "mlflow.artifact_repository": [
        entry_points={
            "mlflow.artifact_repository": "artifactory=mlflow_artifactory_plugin.store.artifact.jfrog_artifact_repository:JFrogArtifactRepository",  # noqa
        ]
    },

Running

Mlflow

Usage

Install by pip on both your client and the server, and then use MLflow as normal. The JFrog Artifactory store support will be provided automatically.

The plugin implements all of the MLflow artifact store APIs. It expects Artifactory Storage access credentials in the MLFLOW_ARTIFACTORY_ENDPOINT_URL, MLFLOW_ARTIFACTORY_KEY and MLFLOW_ARTIFACTORY_REPO environment variables, so you must set these variables on both your client application and your MLflow tracking server. To use Artifactory as an artifact store, an artifactory URI of the form artifactory://<path> must be provided, as shown in the example below:

import mlflow
import mlflow.pyfunc

class Mod(mlflow.pyfunc.PythonModel):
    def predict(self, ctx, inp):
        return 7

exp_name = "myexp"
mlflow.create_experiment(exp_name, artifact_location="artifactory://mlflow-test/")
mlflow.set_experiment(exp_name)
mlflow.pyfunc.log_model('model_test', python_model=Mod())

Fix SSL error

This plugin help to connect to external services (here Jrog artifactory).

If you are facing this error, you proabably need to pass the location of the certifact. ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)

Self-signed SSL certificates are obviously not taken into account implicitly and you need to specify in REQUESTS_CA_BUNDLE. You can get around this behaviour by explicitly merging the environment settings into your session. For a Linux system you can set it like this before running the script: export REQUESTS_CA_BUNDLE=/path/to/certificat/file.pem

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

mlflow-jfrog-artifactory-0.0.3.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

mlflow_jfrog_artifactory-0.0.3-py2.py3-none-any.whl (6.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file mlflow-jfrog-artifactory-0.0.3.tar.gz.

File metadata

  • Download URL: mlflow-jfrog-artifactory-0.0.3.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for mlflow-jfrog-artifactory-0.0.3.tar.gz
Algorithm Hash digest
SHA256 bd8c152e74ddee943e45345efbd28819e914681c58aa72e6fc2d4d44f0754f3f
MD5 9cb1ea0144c5005a826f31d5baefdb5d
BLAKE2b-256 8570816390f539c6c8a501cdcbb3ca023bf18cf454d5efbd260262f5b76a8dcc

See more details on using hashes here.

File details

Details for the file mlflow_jfrog_artifactory-0.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: mlflow_jfrog_artifactory-0.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for mlflow_jfrog_artifactory-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c47b0b8598ff2bc171a73048cd0a17bba45bde615bce58e1686a4900e6b0e746
MD5 1ec6fe8bc0d50ed81798790dcef74d6e
BLAKE2b-256 d70a686d5712bbc08d51986d7920012bd8148d4ddb381a035f99635537861dec

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