This release is a pre-release and may not be stable for production use.
MLflow plugin for Google Cloud Vertex AI
Installation
python3 -m pip install google_cloud_mlflow
Deployment plugin usage
Command-line
Create deployment
mlflow deployments create --target google_cloud --name "deployment name" --model-uri "models:/mymodel/mymodelversion" --config destination_image_uri="gcr.io/<repo>/<path>"
List deployments
mlflow deployments list --target google_cloud
Get deployment
mlflow deployments get --target google_cloud --name "deployment name"
Delete deployment
mlflow deployments delete --target google_cloud --name "deployment name"
Update deployment
mlflow deployments update --target google_cloud --name "deployment name" --model-uri "models:/mymodel/mymodelversion" --config destination_image_uri="gcr.io/<repo>/<path>"
Predict
mlflow deployments predict --target google_cloud --name "deployment name" --input-path "inputs.json" --output-path "outputs.json
Get help
mlflow deployments help --target google_cloud
Python
from mlflow import deployments
client = deployments.get_deploy_client("google_cloud")
# Create deployment
model_uri = "models:/mymodel/mymodelversion"
deployment = client.create_deployment(
name="deployment name",
model_uri=model_uri,
# Config is optional
config=dict(
# Deployed model config
machine_type="n1-standard-2",
min_replica_count=None,
max_replica_count=None,
accelerator_type=None,
accelerator_count=None,
service_account=None,
explanation_metadata=None, # JSON string
explanation_parameters=None, # JSON string
# Model container image building config
destination_image_uri=None,
timeout=None,
# Model deployment config
sync="true",
# Endpoint config
description=None,
# Vertex AI config
project=None,
location=None,
experiment=None,
experiment_description=None,
staging_bucket=None,
# List deployments
deployments = client.list_deployments()
# Get deployment
deployments = client.get_deployment(name="deployment name")
# Delete deployment
deployment = client.delete_deployment(name="deployment name")
# Update deployment
deployment = client.create_deployment(
name="deployment name",
model_uri=model_uri,
# Config is optional
config=dict(...),
)
# Predict
import pandas
df = pandas.DataFrame([
{"a": 1,"b": 2,"c": 3},
{"a": 4,"b": 5,"c": 6}
])
predictions = client.predict("deployment name", df)
Model Registry plugin usage
Set the MLflow Model Registry URI to a directory in some Google Cloud Storage bucket, then log models using mlflow.log_model as usual.
mlflow.set_registry_uri("gs://<bucket>/models/")
Metadata
Release files for google-cloud-mlflow 0.0.4.dev3
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 |
|---|---|---|---|---|
| google_cloud_mlflow-0.0.4.dev3.tar.gz | 22.7 kB | Without provenance | Details for google_cloud_mlflow-0.0.4.dev3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| google_cloud_mlflow-0.0.4.dev3-py3-none-any.whl | Python 3 | none | any | Details for google_cloud_mlflow-0.0.4.dev3-py3-none-any.whl |
Total release size: 47.2 kB
Release files / google_cloud_mlflow-0.0.4.dev3.tar.gz
| Download URL | google_cloud_mlflow-0.0.4.dev3.tar.gz |
|---|---|
| Size | 22.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f6f18832a4dae1dad699c8c54940866363fde510fcbe0ef8560fd8148d23e71a
|
|
BLAKE2b-256 checksum How to use checksums |
590ad91045c54354e9540e922f9a59dedfddd7d2e60ed486c726cad48d6f6cea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.2
|
Release files / google_cloud_mlflow-0.0.4.dev3-py3-none-any.whl
| Download URL | google_cloud_mlflow-0.0.4.dev3-py3-none-any.whl |
|---|---|
| Size | 24.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40a9b4120bb8a0c1ad8ffea2979203a1d57b586e20a78ce039e0032e5a9a91a9
|
|
BLAKE2b-256 checksum How to use checksums |
2455c683fbb866ac206e5d0d6b3d8a8c7aa0f56d2fb6c68460403b72155d5d57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.2
|
Security for google-cloud-mlflow 0.0.4.dev3
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.