datarobot-model-training — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited datarobot-model-training (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill provides guidance for the complete model training workflow in DataRobot, from project creation through model selection and validation.
Most common use case: Create a project and train models
dr.UseCase.get(use_case_id)); otherwise create a new one (dr.UseCase.create(name)). Every project needs one linked in Workbenchupload_dataset(file_path, dataset_name, use_case_id) to upload training data, associated with the Use Casecreate_project(dataset_id, project_name, target_column, use_case_id) to create new project, associated with the same Use Casestart_automl(project_id, mode) to begin AutoML trainingExample: "Create a new project under a 'Sales Forecasting' Use Case with sales_data.csv, set 'revenue' as target, and start Quick AutoML training"
Use this skill when you need to:
User request: "Create a new project using my sales_data.csv file, predict 'revenue' as the target, and start AutoML training."
Agent workflow:
User request: "Train a model with time series settings: datetime column 'date', series ID 'store_id', forecast window 1-7 days."
Agent workflow:
This skill guides you to use the DataRobot Python SDK directly. Install the SDK if needed:
uv pip install datarobot || python -m pip install datarobotUse these DataRobot SDK methods for model training:
Use Cases (organize related datasets/projects/deployments under one entity):
dr.UseCase.create(name, description=None) - Create a new Use Casedr.UseCase.get(use_case_id) - Retrieve an existing Use Case (reuse instead of creating a new one)use_case.add(entity=project_or_dataset) - Attach an already-created project or dataset to a Use CaseProjects:
dr.Project.create_from_dataset(dataset_id, project_name, use_case=use_case) - Create project, linked to a Use Casedr.Project.get(project_id) - Get project detailsdr.Project.list() - List all projectsproject.analyze_and_model(target, mode=dr.AUTOPILOT_MODE.QUICK) - Set the target and start AutoPilotTraining:
project.wait_for_autopilot() - Block until AutoPilot finishesproject.get_status() - Check training statusdr.Model.list(project_id) - List trained modelsdr.Model.get(project_id, model_id) - Get model detailsdr.ModelRecommendation.get(project.id).get_model() - Get DataRobot's recommended modelModel Analysis:
model.metrics - Performance metrics (dict of {metric: {partition: score}})model.get_feature_impact() - Get feature importanceSee the Common Patterns section below for complete examples.
This skill includes executable helper scripts that Claude can run directly:
scripts/create_project.py - Create a new project from a dataset, optionally linked to a Use Casescripts/start_training.py - Set the target and start AutoML trainingscripts/list_models.py - List trained models with metricsThe datarobot-data-preparation skill's scripts/upload_dataset.py accepts the same optional use_case_id argument for linking an uploaded dataset to a Use Case.
Usage example:
# Create (or reuse) a Use Case first
python -c "import datarobot as dr; print(dr.UseCase.create(name='Sales Prediction').id)"
# Upload dataset, linked to the Use Case
python ../datarobot-data-preparation/scripts/upload_dataset.py sales_data.csv "Sales Data" use_case_456
# Create project, set target, and start training (one step), linked to the Use Case
python scripts/create_project.py dataset_123 "Sales Prediction" revenue use_case_456
# (Alternatively, if the project was created without a target:)
# python scripts/start_training.py project_456 revenue Quick
# List models once AutoPilot finishes
python scripts/list_models.py project_456 AUCClaude can run these scripts directly or use them as reference when writing code.
use_case_id via dr.UseCase.get(use_case_id), or create a new one via dr.UseCase.create(name) — and pass it to both Dataset.create_from_file (use_cases=[...]) and Project.create_from_dataset (use_case=...) so the project lands under the intended Use Case rather than a default oneimport datarobot as dr
import os
# Initialize client
dr.Client()
# Reuse an existing Use Case if the user gave us one, otherwise create a new one
existing_use_case_id = os.getenv("DATAROBOT_USE_CASE_ID") # or ask the user for it
use_case = (
dr.UseCase.get(existing_use_case_id)
if existing_use_case_id
else dr.UseCase.create(name="Sales Prediction")
)
# Upload dataset (create_from_file has no name parameter; rename afterwards)
dataset = dr.Dataset.create_from_file(
file_path="training_data.csv", use_cases=[use_case]
)
dataset.modify(name="Sales Data")
# Create project
project = dr.Project.create_from_dataset(
dataset_id=dataset.id, project_name="Sales Prediction", use_case=use_case
)
# Set the target and start AutoPilot (Quick mode).
# analyze_and_model() replaces the deprecated set_target() and starts AutoPilot,
# so no separate start() call is needed.
project.analyze_and_model(
target="revenue", mode=dr.AUTOPILOT_MODE.QUICK, worker_count=-1
)
# Wait for AutoPilot to finish
project.wait_for_autopilot()
# Get DataRobot's recommended model (the one flagged "Recommended for Deployment")
best_model = dr.ModelRecommendation.get(project.id).get_model()
# model.metrics maps each metric to per-partition scores; read the validation score.
metric = project.metric # the project's optimization metric, e.g. "LogLoss" or "AUC"
print(
f"Recommended model: {best_model.id} ({best_model.model_type}), "
f"{metric} (validation): {best_model.metrics[metric]['validation']}"
)import datarobot as dr
import os
# Reuse an existing Use Case if the user gave us one, otherwise create a new one
existing_use_case_id = os.getenv("DATAROBOT_USE_CASE_ID") # or ask the user for it
use_case = (
dr.UseCase.get(existing_use_case_id)
if existing_use_case_id
else dr.UseCase.create(name="Sales Forecast")
)
# Upload dataset (create_from_file has no name parameter; rename afterwards)
dataset = dr.Dataset.create_from_file("sales_data.csv", use_cases=[use_case])
dataset.modify(name="Sales Forecast Data")
# Create project
project = dr.Project.create_from_dataset(
dataset_id=dataset.id, project_name="Sales Forecast", use_case=use_case
)
# Configure time series settings
spec = dr.DatetimePartitioningSpecification(
datetime_partition_column="date",
use_time_series=True,
multiseries_id_columns=["store_id"],
forecast_window_start=1,
forecast_window_end=7,
)
# Set the target and start AutoPilot with time series partitioning
project.analyze_and_model(
target="sales",
mode=dr.AUTOPILOT_MODE.COMPREHENSIVE,
partitioning_method=spec,
max_wait=7200,
)
# Wait for completion and get results
project.wait_for_autopilot()
models = dr.Model.list(project.id)When selecting models, consider:
Common errors and solutions:
Dataset.create_from_file and project.analyze_and_model block for up to max_wait seconds (default 600); pass a larger max_wait for big datasets or slow environmentsuv pip install datarobot || python -m pip install datarobotimport datarobot as dr
dr.Client()~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.