Skip to main content

mb.restart_deployment(name, ...)

Restart a running deployment to ensure its initialization code (e.g. imports and code outside the inference function) are re-executed.

Parameters

  • name: str The name of the deployment.
  • version: Optional[str,'latest'] The version to restart. The version can be the integer version of the deployment, or latest. If no version is specified then latest is used.
  • branch: Optional[str] The branch of the deployment and version. If not specified then the current branch is used. By default that is main.

Returns

No value is returned. A success status message is printed if the command is successful.

Examples

Restart the latest version of a deployment

mb.restart_deployment("example_deployment")

Restart a specific version and branch of a deployment

mb.restart_deployment("example_deployment", version=5, branch="dev")

See also