Skip to main content

API reference

Python API

The Modelbit Python package provides the Python API for interacting with Modelbit. These functions are called on the modelbit module (e.g. import modelbit) or on the logged in session (e.g. mb = modelbit.login()).

Authentication

  • login: Authenticate with your Modelbit workspace.

Deployments

  • deploy: Create and update Modelbit deployments.
  • get_inference: Call the REST APIs of your deployments.

Inference-time helpers

  • get_dataset: Fetch datasets and feature stores as Pandas DataFrames.
  • get_secret: Fetch secrets stored in Modelbit.
  • log_image: Log images during inferences and training jobs.
  • setup: Configure code to run during import time to reduce cold starts.
  • trace: Add performance tracing to inferences calls.

Deployment settings

Training jobs

  • add_job: Create and update training jobs.
  • run_job: Start a training job.

Model registry

  • add_metrics: Add metrics to a model in the registry.
  • add_model: Add one model to the registry.
  • add_models: Add multiple models to the registry.
  • delete_models: Remove one or more models from the registry.
  • get_metrics: Fetch model metrics from the registry.
  • get_model: Fetch one model from the registry.
  • get_models: Fetch multiple models from the registry.
  • models: List models stored in the registry.

Common files & packages

Git Branches

Tags

Management

  • datasets: List available datasets and feature stores.
  • get_deployment_info: Get the name and version of the current deployment.
  • in_modelbit: Check whether the current execution is running in Modelbit or not.
  • warehouses: List the warehouses connected to Modelbit.

Command line interface (CLI)

CLI reference for interacting with modelbit on the command line. The CLI is installed as part of the Modelbit Python package.

Repository

  • clone: Configure and clone a Git repository of your workspace.
  • validate: Check for missing files or configuration issues in your workspace.

Helpers

  • add_common_files: Link files in common into your deployments.
  • deployment: Manage deployments.
  • model: Manage file-based models in the model registry.
  • package: Manage private packages to your Modelbit workspace.

Maintenance

  • debug: Print debug information.
  • version: Return the version of the currently installed modelbit package.

Settings files

The Modelbit git repository includes several files that specify settings.