API reference
Python API
Parameter reference for all methods in the Modelbit Python package. These functions are called on the modelbit
module (e.g. import modelbit
) or on the logged in instance (e.g. mb = modelbit.login()
).
Authentication
modelbit.login
: Authenticating with Modelbit
Deployments
mb.deploy
: Creating and updating Modelbit deploymentsmodelbit.get_inference
: An easy way to call your deployments
Inference-time helpers
mb.get_dataset
: Fetching datasets and filtering feature storesmb.get_secret
: Fetching a secret stored in Modelbitmb.log_image
: Log images to Modelbit logsmodelbit.setup
: Run code during import time and reduce cold startsmodelbit.trace
: Add performance tracing to your deployments
Deployment settings
mb.add_files
: Adding newpkl
files to deploymentsmb.restart_deployment
: Restart running deploymentsmb.get_snowflake_mock_return_value
: Fetch the Snowflake mock return valuemb.set_snowflake_mock_return_value
: Set the Snowflake mock return value
Training jobs
mb.add_job
: Adding and updating training jobs to deploymentsmb.run_job
: Start a training job
Model Registry
mb.add_metrics
: Add metrics to a model in the registrymb.add_model
: Adds one model to the registrymb.add_models
: Adds multiple models to the registrymb.delete_models
: Remove one or more models from the registrymb.get_metrics
: Fetches a model's metrics from the registrymb.get_model
: Fetches a model from the registrymb.get_models
: Fetches multiple models from the registrymb.models
: Lists models in the registry
Common files & packages
mb.add_common_files
: Adding common filesmb.add_package
: Uploading local packages as shared code to Modelbitmb.common_files
: Listing common filesmb.delete_common_files
: Deleting common filesmb.delete_package
: Remove packages from Modelbit
Git Branches
mb.create_branch
: Create a new git branchmb.get_branch
: Get the current git branchmb.merge_deployment
: Merge deployments between branchesmb.switch_branch
: Change the current git branch
Management
mb.datasets
: Listing available datasets and feature storesmb.get_deployment_info
: Get the name of version of the current deploymentmb.in_modelbit
: Check if this code is running in Modelbit or locallymb.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.
add_common_files
: Link files incommon
into your deploymentclone
: Configures and clones a git repository of your workspacedeployment
: Manage deploymentsmodel
: Manage file-based models in the model registrypackage
: Add private packages to your Modelbit workspacevalidate
: Check for missing files or configuration files in your deploymentsversion
: Return the version of the currently installedmodelbit
package