Skip to main content
Version: Next

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.
ConstantValueDescription
H2O_MLOPS_GATEWAY_URLUsually: https://mlops-api.my.domainDefines 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_URLhttps://auth.my.domain/auth/realms/<realm>/protocol/openid-connect/tokenDefines 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 namedeployable_artifact_type_nameArtifact processor name
dai/mojo_pipelinedai_mojo_pipelinedai_mojo_pipeline_extractor
dai/scoring_pipelinedai_python_scoring_pipelineartifact-processor_dai_pipelines_193
h2o3/mojoh2o3_mojoh2o3_mojo_extractor
python/mlflowpython/mlflow.zipunzip_processor
mlflow/mojo_pipelinemlflow_mojo_pipelinemlflow_mojo_pipeline_extractor
mlflow/scoring_pipelinemlflow_scoring_pipelinemlflow_scoring_pipeline_extractor
mlflow/h2o3_mojomlflow_h2o3_mojomlflow_h2o3_mojo_extractor
vllm/configvllm_configvllm_config_processor

Runtime names mapping

The following table describes the mapping of runtime names.

Model typeModel descriptionHuman-readable runtime nameRuntime name
mlflowvLLMvllm_openai_api_protocol_runtime
vllmvLLMvllm_openai_api_protocol_native_mlops_runtime
dai_mojoDAI MOJO models (C++ runtime) - supports all Shapley contribution types and is expected to have significantly lower memory usageDAI MOJO Scorer (C++ Runtime)dai-mojo-cpp_experimental
dai_mojoDAI MOJO models (Java runtime)H2O.ai MOJO scorerdai_mojo_runtime
dai_mojoDAI MOJO models (Java runtime) - with Shapley contributions for original featuresDAI MOJO Scorer (Shapley original only)mojo_runtime_shapley_original
dai_mojoDAI MOJO models (Java runtime) - with Shapley contributions for transformed featuresDAI MOJO Scorer (Shapley transformed only)mojo_runtime_shapley_transformed
dai_mojoDAI MOJO models (Java runtime) - with Shapley contributions for both original and transformed featuresDAI MOJO Scorer (Shapley all)mojo_runtime_shapley_all
dai_python_scoring_pipelineDAI Python Scoring Pipeline models created by DAI 1.10.7Python Pipeline Scorer [DAI 1.10.7]python-scorer_dai_pipelines_1107
dai_python_scoring_pipelineDAI Python Scoring Pipeline models created by DAI 1.10.7.1Python Pipeline Scorer [DAI 1.10.7.1]python-scorer_dai_pipelines_11071
dai_python_scoring_pipelineDAI Python Scoring Pipeline models created by DAI 1.10.7.2Python Pipeline Scorer [DAI 1.10.7.2]python-scorer_dai_pipelines_11072
dai_python_scoring_pipelineDAI Python Scoring Pipeline models created by DAI 1.10.7.3Python Pipeline Scorer [DAI 1.10.7.3]python-scorer_dai_pipelines_11073
dai_python_scoring_pipelineDAI Python Scoring Pipeline models created by DAI 1.11.0Python Pipeline Scorer [DAI 1.11.0]python-scorer_dai_pipelines_1110
dai_python_scoring_pipelineDAI Python Scoring Pipeline models created by DAI 1.11.1.1Python Pipeline Scorer [DAI 1.11.1.1]python-scorer_dai_pipelines_11111
mlflowMLFlow non-H2O.ai models created with Python 3.10[PY-3.10][CPU] HT Flexible Runtimepython-scorer_hydrogen_torch_cpu_py310
mlflowMLFlow non-H2O.ai models created with Python 3.10[PY-3.10][GPU] HT Flexible Runtimepython-scorer_hydrogen_torch_gpu_py310
h2o3_mojoH2O-3 MOJO modelsH2O.ai MOJO scorerh2o3_mojo_runtime
mlflowMLFlow non-H2O.ai models created with Python 3.9MLflow Model Scorer [Python 3.9]python-scorer_mlflow_39
mlflowMLFlow non-H2O.ai models created with Python 3.10[Py-3.10] MLflow Model Scorerpython-scorer_mlflow_310
mlflowMLFlow non-H2O.ai models created with Python 3.11[Py-3.11] MLflow Model Scorerpython-scorer_mlflow_311
mlflowMLFlow non-H2O.ai models created with Python 3.12[Py-3.12] MLflow Model Scorerpython-scorer_mlflow_312
mlflowMLFlow non-H2O.ai models created with Python 3.9[Py-3.9] Dynamic MLflow Model Scorerpython-scorer_mlflow_dynamic_39
mlflowMLFlow non-H2O.ai models created with Python 3.10[Py-3.10] Dynamic MLflow Model Scorerpython-scorer_mlflow_dynamic_310
mlflowMLFlow non-H2O.ai models created with Python 3.11[Py-3.11] Dynamic MLflow Model Scorerpython-scorer_mlflow_dynamic_311
mlflowMLFlow non-H2O.ai models created with Python 3.12[Py-3.12] Dynamic MLflow Model Scorerpython-scorer_mlflow_dynamic_312

Feedback