Method
retrainModel POST
Copy POST

Retrains the specified model, with an option to choose the deployments to which the retraining will be deployed.

Arguments:

REQUIRED KEY TYPE DESCRIPTION
Yes modelId str Unique string identifier of the model to retrain.
No deploymentIds list List of unique string identifiers of deployments to automatically deploy to.
No featureGroupIds list List of feature group IDs provided by the user to train the model on.
No customAlgorithms list List of user-defined algorithms to train. If not set, will honor the runs from the last time and applicable new custom algorithms.
No builtinAlgorithms list List of algorithm names or algorithm IDs of Abacus.AI built-in algorithms to train. If not set, will honor the runs from the last time and applicable new built-in algorithms.
No customAlgorithmConfigs dict User-defined training configs for each custom algorithm.
No cpuSize str Size of the CPU for the user-defined algorithms during training.
No memory int Memory (in GB) for the user-defined algorithms during training.
No trainingConfig TrainingConfig The training config used to train this model.
KEY TYPE Description
KWARGS None None
PROBLEM_TYPE None None
ALGORITHM None None
_SUPPORT_KWARGS None None
_UPPER_SNAKE_CASE_KEYS None None
No algorithmTrainingConfigs list List of algorithm specifc training configs that will be part of the model training AutoML run.
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 Model
KEY TYPE Description
name str The user-friendly name for the model.
modelId str The unique identifier of the model.
modelConfigType str Name of the TrainingConfig class of the model_config.
modelPredictionConfig dict The prediction config options for the model.
createdAt str Date and time at which the model was created.
projectId str The project this model belongs to.
shared bool If model is shared to the Abacus.AI model showcase.
sharedAt str The date and time at which the model was shared to the model showcase
trainFunctionName str Name of the function found in the source code that will be executed to train the model. It is not executed when this function is run.
predictFunctionName str Name of the function found in the source code that will be executed run predictions through model. It is not executed when this function is run.
predictManyFunctionName str Name of the function found in the source code that will be executed to run batch predictions trhough the model.
initializeFunctionName str Name of the function found in the source code to initialize the trained model before using it to make predictions using the model
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 functions return value).
sourceCode str Python code used to make the model.
cpuSize str Cpu size specified for the python model training.
memory Int Memory in GB specified for the python model training.
trainingFeatureGroupIds List of Unique String Identifiers The unique identifiers of the feature groups used as the inputs to train this model on.
algorithmModelConfigs List[dict] List of algorithm specific training configs.
trainingVectorStoreVersions list The vector store version IDs used as inputs during training to create this ModelVersion.
documentRetrievers list List of document retrievers use to create this model.
documentRetrieverIds list List of document retriever IDs used to create this model.
isPythonModel bool If this model is handled as python model
defaultAlgorithm str If set, this algorithm will always be used when deploying the model regardless of the model metrics
customAlgorithmConfigs dict User-defined configs for each of the user-defined custom algorithm
restrictedAlgorithms dict User-selected algorithms to train.
useGpu bool If this model uses gpu.
notebookId str The notebook associated with this model.
trainingRequired bool If training is required to keep the model up-to-date.
latestModelVersion ModelVersion The latest model version.
location ModelLocation Location information for models that are imported.
refreshSchedules RefreshSchedule List of refresh schedules that indicate when the next model version will be trained
codeSource CodeSource If a python model, information on the source code
databaseConnector DatabaseConnector Database connector used by the model.
dataLlmFeatureGroups FeatureGroup List of feature groups used by the model for queries
modelConfig TrainingConfig The training config options used to train this model.

Exceptions:

TYPE WHEN
DataNotFoundError

modelId is not found.

DataNotFoundError

deploymentIds is not found.

DataNotFoundError

featureGroupIds is not found.

InvalidEnumParameterError

An invalid value is passed for cpuSize.

ConflictError

The model is currently training.

ConflictError

The project has validation errors.

InvalidParameterError

At least one of the deployments specified does not belong in the same project as the specified model.

InvalidParameterError

If custom algorithm config is not a valid JSON.

Language:

Coming Soon!