Huawei Cloud OBS store plugin for MLflow
This repository provides a MLflow plugin that allows users to use a Huawei Cloud OBS as the artifact store for MLflow.
Implementation overview
huaweicloudstoreplugin: this package includes theHuaweiCloudObsArtifactRepositoryclass that is used to read and write artifacts from Huawei Cloud OBS storage.setup.pyfile defines entrypoints that tell MLflow to automatically associate theobsURIs with theHuaweiCloudObsArtifactRepositoryimplementation when thehuaweicloudstorepluginlibrary is installed. The entrypoints are configured as follows:
entry_points={
"mlflow.artifact_repository":
"obs=huaweicloudstoreplugin.store.artifact.huaweicloud_obs_artifact_repo.py:HuaweiCloudObsArtifactRepository"
]
},
Usage
Install by pip on both your client and the server, and then use MLflow as normal. The Huawei Cloud OBS artifact store support will be provided automatically.
pip install huaweicloudstoreplugin
The plugin implements all of the MLflow artifact store APIs.
It expects Huawei Cloud Storage access credentials in the MLFLOW_OBS_REGION, MLFLOW_OBS_ACCESS_KEY_ID and MLFLOW_OBS_SECRET_ACCESS_KEY environment variables,
so you must set these variables on both your client application and your MLflow tracking server.
To use Huawei Cloud OBS as an artifact store, an OBS URI of the form obs://<bucket>/<path> must be provided, as shown in the example below:
import mlflow
class DemoModel(mlflow.pyfunc.PythonModel):
def predict(self, ctx, inp) -> int:
return 1
experiment = "demo"
mlflow.create_experiment(experiment, artifact_location="obs://mlflow-test/")
mlflow.set_experiment(experiment)
mlflow.pyfunc.log_model('model_test', python_model=DemoModel())
In the example provided above, the log_model operation creates three entries in the OBS storage obs://mlflow-test/$RUN_ID/artifacts/model_test/, the MLmodel file
and the conda.yaml file associated with the model.
Metadata
Release files for huaweicloudstoreplugin 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| huaweicloudstoreplugin-0.2.0.tar.gz | 9.8 kB | Without provenance | Details for huaweicloudstoreplugin-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| huaweicloudstoreplugin-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for huaweicloudstoreplugin-0.2.0-py3-none-any.whl |
Total release size: 19.1 kB
Release files / huaweicloudstoreplugin-0.2.0.tar.gz
| Download URL | huaweicloudstoreplugin-0.2.0.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af9a1bc91512864c730b8de1606da99e4bdf3161e2c452c1ab44ddb09ded314b
|
|
BLAKE2b-256 checksum How to use checksums |
06f1bf5f44cd6f5cbc6e9261b61d45879fef0386b9fb0fdd3cee7ab79479a248
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Release files / huaweicloudstoreplugin-0.2.0-py3-none-any.whl
| Download URL | huaweicloudstoreplugin-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2cf28c5e50e79d380fcde622ec08812c5126d6b59ea14caa256504ec7124c94d
|
|
BLAKE2b-256 checksum How to use checksums |
a0290f52a94c2742c2c52deb26e1a5c2485d1d20b26b826167a393252eef3183
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Security for huaweicloudstoreplugin 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.