Method
updatePythonModelZip POST
Copy POST

Updates an existing Python Model using a provided zip file. If a list of input feature groups are supplied, they will be provided as arguments to the train and predict functions with the materialized feature groups for those input feature groups.

Arguments:

REQUIRED KEY TYPE DESCRIPTION
Yes modelId str The unique ID associated with the Python model to be changed.
No trainFunctionName str Name of the function found in the train module that will be executed to train the model. It is not executed when this function is run.
No predictFunctionName str Name of the function found in the predict module that will be executed to run predictions through the model. It is not executed when this function is run.
No predictManyFunctionName str Name of the function found in the predict module that will be executed to run batch predictions through the model. It is not executed when this function is run.
No trainModuleName str Full path of the module that contains the train function from the root of the zip.
No predictModuleName str Full path of the module that contains the predict function from the root of the zip.
No trainingInputTables list List of feature groups that are supplied to the train function as parameters. Each of the parameters are materialized Dataframes (same type as the function's return value).
No cpuSize str Size of the CPU for the model training function.
No memory int Memory (in GB) for the model training function.
No packageRequirements list List of package requirement strings. For example: ['numpy==1.2.3', 'pandas>=1.4.0'].
No useGpu bool Whether this model needs gpu
Note: The arguments for the API methods follow camelCase but for Python SDK underscore_case is followed.

Response:

KEY TYPE DESCRIPTION
success Boolean true if the call succeeded, false if there was an error
result Upload
KEY TYPE Description
uploadId str The unique ID generated when the upload process of the full large file in smaller parts is initiated.
datasetUploadId str Same as upload_id. It is kept for backwards compatibility purposes.
status str The current status of the upload.
datasetId str A reference to the dataset this upload is adding data to.
datasetVersion str A reference to the dataset version the upload is adding data to.
modelId str A reference the model the upload is creating a version for
modelVersion str A reference to the model version the upload is creating.
batchPredictionId str A reference to the batch prediction the upload is creating.
parts List[dict] A list containing the order of the file parts that have been uploaded.
createdAt str The timestamp at which the upload was created.

Exceptions:

TYPE WHEN
DataNotFoundError

modelId is not found.

InvalidEnumParameterError

An invalid value is passed for cpuSize.

InvalidParameterError

The model ID refers to a non-Python model.

Language: