Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlflow_oss_artifact-2.0.1.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file mlflow_oss_artifact-2.0.1.tar.gz.

File metadata

  • Download URL: mlflow_oss_artifact-2.0.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6

File hashes

Hashes for mlflow_oss_artifact-2.0.1.tar.gz
Algorithm Hash digest
SHA256 8ccbb3e740c13ac119a07992efda3d9cf68aabe94e7782ee0f178a8f82bce73c
MD5 2f248d41d78c1ef96fa85fc222e055cb
BLAKE2b-256 6aa3cf9aa3740f9193752ee68245e0d429d634e8c795423a3ea6400eb706e1ef

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