Skip to content

arcosx/mlflow-baidubce-store-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:https://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())

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages