Skip to main content

mb.add_files(deployment_name, file_list)

Adds files to a running deployment. Calling this function will redeploy the deployment after adding the files. Learn more

Parameters

  • deployment_name: str The name of the deployment to add the file to.
  • file_list: Union[str, List[str], Dict[str, str]]: The files to add to the deployment.
    • as str: The path to a single file or directory.
    • as List[str]: Paths to multiple files or directories.
    • as Dict[str, str]: Pairs of file paths or directories. The key is the local file path, the value is the file path in common files.

Examples

Adding local files to a deployment

When the local files have the same relative path as in the deployment, you can add them by listing their paths:

mb.add_files("deployment_name", ["file1.pkl", "file2.pkl"])

Using different local vs. deployment filepaths

If the local filepaths and deployment filepaths are different, add the files using the dict syntax:

mb.add_files(my_deployment, { "/trained_models/updated_model.pkl": "updated_model.pkl" })

See also