Skip to main content

Add-on for accessing MlFlow tracking server behing GCP IAP.

Project description


AiBox Lab
mlflow-gcp-iap

MlFlow add-on to access IAP-enabled tracking server on GCP.

Python PyPI

Quickstart

Install the library using your favorite package manager:

uv add mlflow-gcp-iap
uv pip install mlflow-gcp-iap
pip install mlflow-gcp-iap

Once the library is installed, you must configure it by running mlflow-gcp-iap setup. The CLI will ask for the required configuration.

It is essential that the GCP Application Default Credentials is configured locally, and that the user and service account have sufficient permissions. For the user, permissions related to Service Account Impersonation and token creation are required. For the service account, only the permission to access the IAP-protected MlFlow tracking server is mandatory.

To check whether the configuration works correctly, run mlflow-gcp-iap test. This command runs the script src/mlflow_gcp_iap/test.py, which creates a run on the MlFlow server.

The library provides a simple context manager that automatically refresh tokens and update the MlFlow environment variables. The intended usage is as follows:

import mlflow

from mlflow_gcp_iap import TokenRefresher


if __name__ == "__main__":
    with TokenRefresher():
        with mlflow.start_run(run_name="my-run"):
            mlflow.log_params({"a": 10, "b": 20})
            mlflow.log_metrics({"MSE": 0.0})

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_gcp_iap-0.0.2.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlflow_gcp_iap-0.0.2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file mlflow_gcp_iap-0.0.2.tar.gz.

File metadata

  • Download URL: mlflow_gcp_iap-0.0.2.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for mlflow_gcp_iap-0.0.2.tar.gz
Algorithm Hash digest
SHA256 526603e69ce00ef5b7e95de1f9c3b5ea8bcb46fffbd4ec7336458873cdbd0eb9
MD5 edeff14e62bd1c03dd6f0f0e1856c931
BLAKE2b-256 e38b75e701c23bde0cbedadc0f69d94a405780df799cf124affa77862b9ef8fa

See more details on using hashes here.

File details

Details for the file mlflow_gcp_iap-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mlflow_gcp_iap-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 66036bd54f2e7fe627680726282c2431e4c292af85d16d4e783a509ec52e3cc7
MD5 5fd353f59b50f4b8fea24a5c6bd4adf3
BLAKE2b-256 4de63516405fa46d855b4f084216ef12f770ea194a63d94a72f5f913c21c1d81

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