Plugin that provides Aliyun oss Artifact Store functionality for MLflow
Project description
Xkool Aliyun OSS store plugin for MLflow
Forked and modified from SeaOfOcean at https://github.com/SeaOfOcean/mlflow-aliyunstore
This repository provides a MLflow plugin that allows users to use Aliyun OSS as the artifact store for MLflow.
Usage
Pip install the package on both your client and the server
pip install mlflow-oss-artifact
Configure environment variables in your OS for Aliyun OSS authentication
Note: checkout this post on stackoverflow to make them permanent if necessary
export MLFLOW_OSS_ENDPOINT_URL=<oss-xx-cityname.aliyuncs.com>
export MLFLOW_OSS_KEY_ID=<your_oss_key_id>
export MLFLOW_OSS_KEY_SECRET=<your_oss_key_secret>
export MLFLOW_OSS_BUCKET_NAME=<your_bucket_name>
To use To use Aliyun OSS as an artifact store, an OSS URI of the form oss://<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="oss://mlflow-test/")
mlflow.set_experiment(exp_name)
mlflow.pyfunc.log_model('model_test', python_model=Mod())
In the example provided above, the log_model
operation creates three entries in the OSS storage oss://mlflow-test/$RUN_ID/artifacts/model_test/
, the MLmodel file
and the conda.yaml file associated with the model.
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
Hashes for mlflow-oss-artifact-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffbfccdae4c0ad7c71070bb201c7ac2220cc3b36e085da7faf6b2c340e8d6662 |
|
MD5 | aca190c91453a2b42fa8f2d7409f6348 |
|
BLAKE2b-256 | 9232494786f3db58f492f165102cb47995ccc5c918ea08fb79a66690d7c431e5 |