Models
Create, manage, and load machine learning models.
All methods are accessed via client.models.
create_model()
POST/v1/models/create
Create a new model.
Parameters
modelRequired
The XClassifier or XRegressor model
model_namestrRequired
Name of the model
model_descriptionstrRequired
Description of the model
xDataFrameRequired
Feature matrix
ySeriesRequired
Target variable
run_idstrdefault:
NoneOptional run ID to associate with the model
Returns
tuple — Tuple of (model_id, version_id)
Example
1result = client.models.create_model(
2 model=model,
3 model_name="My Model",
4 model_description="Predicts customer churn",
5 x=X_train,
6 y=y_train,
7 run_id="run_abc123"
8)
add_version()
POST/v1/models/add-version
Add a new version to an existing model.
Parameters
modelRequired
The XClassifier or XRegressor model
model_idstrRequired
ID of the existing model
xDataFrameRequired
Feature matrix
ySeriesRequired
Target variable
Returns
str — The new version_id
Example
1result = client.models.add_version(
2 model=model,
3 model_id="model_abc123",
4 x=X_train,
5 y=y_train
6)
list_team_models()
GET/v1/models/teams/{team_id}
List all models for the current team (based on API key). This method returns comprehensive information about all models accessible to the authenticated user's team.
Returns
list — List of model information including names, descriptions, and metadata
Example
1result = client.models.list_team_models()
get_model()
GET/v1/models/{model_id}
Get detailed information about a model.
Parameters
model_idstrRequired
ID of the model
Returns
ModelInfo — Model information
Example
1result = client.models.get_model(
2 model_id="model_abc123"
3)
list_model_versions()
GET/v1/models/versions/{model_id}
List all versions of a model.
Parameters
model_idstrRequired
ID of the model
Returns
list — List of model versions
Example
1result = client.models.list_model_versions(
2 model_id="model_abc123"
3)
list_model_version_partitions()
GET/v1/models/partitions/{version_id}
List all partitions for a model version.
Parameters
version_idstrRequired
ID of the model version (or "latest")
Returns
dict — Dictionary containing partition information