Skip to main content

A MLflow plugin that allows users to use Baidu BCE BOS as the artifact store for MLflow.

Project description

mlflow-baidubce-store-plugin

A MLflow plugin that allows users to use Baidu BCE BOS(CN/EN) as the artifact store for MLflow.

Example

pip install mlflow-baidubce-store-plugin -U
import mlflow.pyfunc
import os

os.environ["MLFLOW_BOS_ENDPOINT"] = "bj.bcebos.com"
os.environ["MLFLOW_BOS_SECRET_ACCESS_KEY"] = "AK"
os.environ["MLFLOW_BOS_KEY_ID"] = "SK"

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


exp_name = "bos-exp"
mlflow.create_experiment(exp_name, artifact_location="bos://mlflow-test/")
mlflow.set_experiment(exp_name)
mlflow.pyfunc.log_model('model_test', python_model=Mod())
print(mlflow.get_artifact_uri())
mlflow.artifacts.download_artifacts(mlflow.get_artifact_uri())

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-baidubce-store-plugin-1.0.7.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page