Creates a custom algorithm that is re-usable for model training.
REQUIRED | KEY | TYPE | DESCRIPTION |
---|---|---|---|
Yes | name | str | The name to identify the algorithm; only uppercase letters, numbers, and underscores are allowed. |
Yes | problemType | str | The type of problem this algorithm will work on. |
No | sourceCode | str | Contents of a valid Python source code file. The source code should contain the train/predict/predict_many/initialize functions. A list of allowed import and system libraries for each language is specified in the user functions documentation section. |
No | trainingDataParameterNamesMapping | dict | The mapping from feature group types to training data parameter names in the train function. |
No | trainingConfigParameterName | str | The train config parameter name in the train function. |
No | 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. |
No | predictFunctionName | str | Name of the function found in the source code 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 source code that will be executed for batch prediction of the model. It is not executed when this function is run. |
No | 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. |
No | configOptions | dict | Map dataset types and configs to train function parameter names. |
No | isDefaultEnabled | bool | Whether to train with the algorithm by default. |
No | projectId | str | The unique version ID of the project. |
No | useGpu | bool | Whether this algorithm needs to run on GPU. |
No | packageRequirements | list | List of package requirement strings. For example: ['numpy==1.2.3', 'pandas>=1.4.0']. |
KEY | TYPE | DESCRIPTION | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
success | Boolean | true if the call succeeded, false if there was an error | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
result | Algorithm |
|
TYPE | WHEN |
---|---|
DataNotFoundError |
|
InvalidEnumParameterError | An invalid value is passed for |
ConflictError | The source code is invalid. |
InvalidParameterError | The algorithm name is invalid. |