Python client usage
Connecting to MLOps with Python client
Note
- You will need the values for the following constants in order to successfully connect to MLOps. Contact your administrator to obtain deployment specific values.
- Additionally, a custom certificate file may sometimes be required to verify the peer's SSL/TLS certificate.
Constant | Value | Description |
---|---|---|
H2O_MLOPS_GATEWAY_URL | Usually: https://mlops-api.my.domain | Defines the URL for the MLOps Gateway component. You can verify the correct URL by navigating to the API URL in your browser. It should provide a page with a list of available routes. |
TOKEN_ENDPOINT_URL | https://auth.my.domain/auth/realms/<realm>/protocol/openid-connect/token | Defines the token endpoint URL of the Identity Provider. This uses Keycloak as the Identity Provider. Keycloak Realm should be provided. Replace <realm> with your specific realm name. |
REFRESH_TOKEN | <your-refresh-token> | Defines the user's refresh token |
CLIENT_ID | <your-client-id> | Sets the client id for authentication. This is the client you will be using to connect to MLOps. |
H2O_CLOUD_URL | <h2o_cloud_url> | Defines the full URL required to connect to H2O Cloud |
Artifact names mapping
The following table describes the mapping of artifact names.
Storage artifact name | deployable_artifact_type_name | Artifact processor name |
---|---|---|
dai/mojo_pipeline | dai_mojo_pipeline | dai_mojo_pipeline_extractor |
dai/scoring_pipeline | dai_python_scoring_pipeline | artifact-processor_dai_pipelines_193 |
h2o3/mojo | h2o3_mojo | h2o3_mojo_extractor |
python/mlflow | python/mlflow.zip | unzip_processor |
mlflow/mojo_pipeline | mlflow_mojo_pipeline | mlflow_mojo_pipeline_extractor |
mlflow/scoring_pipeline | mlflow_scoring_pipeline | mlflow_scoring_pipeline_extractor |
mlflow/h2o3_mojo | mlflow_h2o3_mojo | mlflow_h2o3_mojo_extractor |
vllm/config | vllm_config | vllm_config_processor |
Runtime names mapping
The following table describes the mapping of runtime names.
Model type | Model description | Human-readable runtime name | Runtime name |
---|---|---|---|
mlflow | vLLM | vllm_openai_api_protocol_runtime | |
vllm | vLLM | vllm_openai_api_protocol_native_mlops_runtime | |
dai_mojo | DAI MOJO models (C++ runtime) - supports all Shapley contribution types and is expected to have significantly lower memory usage | DAI MOJO Scorer (C++ Runtime) | dai-mojo-cpp_experimental |
dai_mojo | DAI MOJO models (Java runtime) | H2O.ai MOJO scorer | dai_mojo_runtime |
dai_mojo | DAI MOJO models (Java runtime) - with Shapley contributions for original features | DAI MOJO Scorer (Shapley original only) | mojo_runtime_shapley_original |
dai_mojo | DAI MOJO models (Java runtime) - with Shapley contributions for transformed features | DAI MOJO Scorer (Shapley transformed only) | mojo_runtime_shapley_transformed |
dai_mojo | DAI MOJO models (Java runtime) - with Shapley contributions for both original and transformed features | DAI MOJO Scorer (Shapley all) | mojo_runtime_shapley_all |
dai_python_scoring_pipeline | DAI Python Scoring Pipeline models created by DAI 1.10.7 | Python Pipeline Scorer [DAI 1.10.7] | python-scorer_dai_pipelines_1107 |
dai_python_scoring_pipeline | DAI Python Scoring Pipeline models created by DAI 1.10.7.1 | Python Pipeline Scorer [DAI 1.10.7.1] | python-scorer_dai_pipelines_11071 |
dai_python_scoring_pipeline | DAI Python Scoring Pipeline models created by DAI 1.10.7.2 | Python Pipeline Scorer [DAI 1.10.7.2] | python-scorer_dai_pipelines_11072 |
dai_python_scoring_pipeline | DAI Python Scoring Pipeline models created by DAI 1.10.7.3 | Python Pipeline Scorer [DAI 1.10.7.3] | python-scorer_dai_pipelines_11073 |
dai_python_scoring_pipeline | DAI Python Scoring Pipeline models created by DAI 1.11.0 | Python Pipeline Scorer [DAI 1.11.0] | python-scorer_dai_pipelines_1110 |
dai_python_scoring_pipeline | DAI Python Scoring Pipeline models created by DAI 1.11.1.1 | Python Pipeline Scorer [DAI 1.11.1.1] | python-scorer_dai_pipelines_11111 |
mlflow | MLFlow non-H2O.ai models created with Python 3.10 | [PY-3.10][CPU] HT Flexible Runtime | python-scorer_hydrogen_torch_cpu_py310 |
mlflow | MLFlow non-H2O.ai models created with Python 3.10 | [PY-3.10][GPU] HT Flexible Runtime | python-scorer_hydrogen_torch_gpu_py310 |
h2o3_mojo | H2O-3 MOJO models | H2O.ai MOJO scorer | h2o3_mojo_runtime |
mlflow | MLFlow non-H2O.ai models created with Python 3.9 | MLflow Model Scorer [Python 3.9] | python-scorer_mlflow_39 |
mlflow | MLFlow non-H2O.ai models created with Python 3.10 | [Py-3.10] MLflow Model Scorer | python-scorer_mlflow_310 |
mlflow | MLFlow non-H2O.ai models created with Python 3.11 | [Py-3.11] MLflow Model Scorer | python-scorer_mlflow_311 |
mlflow | MLFlow non-H2O.ai models created with Python 3.12 | [Py-3.12] MLflow Model Scorer | python-scorer_mlflow_312 |
mlflow | MLFlow non-H2O.ai models created with Python 3.9 | [Py-3.9] Dynamic MLflow Model Scorer | python-scorer_mlflow_dynamic_39 |
mlflow | MLFlow non-H2O.ai models created with Python 3.10 | [Py-3.10] Dynamic MLflow Model Scorer | python-scorer_mlflow_dynamic_310 |
mlflow | MLFlow non-H2O.ai models created with Python 3.11 | [Py-3.11] Dynamic MLflow Model Scorer | python-scorer_mlflow_dynamic_311 |
mlflow | MLFlow non-H2O.ai models created with Python 3.12 | [Py-3.12] Dynamic MLflow Model Scorer | python-scorer_mlflow_dynamic_312 |
Feedback
- Submit and view feedback for this page
- Send feedback about H2O MLOps to cloud-feedback@h2o.ai