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.
Implementation overview
artifactory: this package includes theJFrogArtifactRepositoryclass that is used to read and write artifacts from Aliyun OSS storage.setup.pyfile defines entrypoints that tell MLflow to automatically associate theartifactoryURIs with theJFrogArtifactRepositoryimplementation when theartifactorylibrary 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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd8c152e74ddee943e45345efbd28819e914681c58aa72e6fc2d4d44f0754f3f
|
|
| MD5 |
9cb1ea0144c5005a826f31d5baefdb5d
|
|
| BLAKE2b-256 |
8570816390f539c6c8a501cdcbb3ca023bf18cf454d5efbd260262f5b76a8dcc
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c47b0b8598ff2bc171a73048cd0a17bba45bde615bce58e1686a4900e6b0e746
|
|
| MD5 |
1ec6fe8bc0d50ed81798790dcef74d6e
|
|
| BLAKE2b-256 |
d70a686d5712bbc08d51986d7920012bd8148d4ddb381a035f99635537861dec
|