client.add_model_artifact

Adds a model artifact to an existing model

📘

Note

Before calling this function, you must have already added a model using add_model.

Input ParameterTypeDefaultDescription
project_idstrNoneThe unique identifier for the project.
model_idstrNoneA unique identifier for the model.
model_dirstrNoneA path to the directory containing all of the model files needed to run the model.
deployment_typeOptional [str]'predictor'The type of deployment for the model. Can be one of
'predictor' — Just a predict endpoint is exposed.
'executor' — The model's internals are exposed.
image_uriOptional [str]NoneA URI of the form '/:'. If specified, the image will be used to create a new runtime to serve the model.
namespaceOptional [str]'default'The Kubernetes namespace to use for the newly created runtime. image_uri must be specified.
portOptional [int]5100The port to use for the newly created runtime. image_uri must be specified.
replicasOptional [int]1The number of replicas running the model. image_uri must be specified.
cpusOptional [int]0.25The number of CPU cores reserved per replica. image_uri must be specified.
memoryOptional [str]'128m'The amount of memory reserved per replica. image_uri must be specified.
gpusOptional [int]0The number of GPU cores reserved per replica. image_uri must be specified.
await_deploymentOptional [bool]TrueIf True, will block until deployment completes.
PROJECT_ID = 'example_project'
MODEL_ID = 'example_model'

client.add_model_artifact(
    model_dir='model_dir/',
    project_id=PROJECT_ID,
    model_id=MODEL_ID
)