Guides DataRobot model predictions via real-time scoring, batch predictions, and dataset template generation. Validates inputs and retrieves deployment features for ML deployments.
npx claudepluginhub datarobot-oss/datarobot-agent-skills --plugin datarobot-agent-skillsThis skill uses the workspace's default tool permissions.
This skill provides comprehensive guidance for working with DataRobot predictions, including real-time predictions, batch scoring, and generating prediction datasets.
Deploys DataRobot models to production, manages deployments, configures prediction environments, performs model swaps, and retrieves endpoints for predictions.
Guides prediction monitoring in ML deployments with step-by-step instructions, best practices, code generation, and configs for MLOps pipelines, model serving, inference, and production optimization.
Automates DataRobot operations via Composio toolkit and Rube MCP. Discovers tools with RUBE_SEARCH_TOOLS, manages connections via RUBE_MANAGE_CONNECTIONS, and executes with RUBE_MULTI_EXECUTE_TOOL.
Share bugs, ideas, or general feedback.
This skill provides comprehensive guidance for working with DataRobot predictions, including real-time predictions, batch scoring, and generating prediction datasets.
Most common use case: Generate predictions for a deployment
get_deployment_features(deployment_id) to understand required columnsgenerate_prediction_data_template(deployment_id, n_rows) to create CSV structuredeployment.predict_batch(...) (works for both single-row “real-time” and batch scoring)Example: "Generate a prediction dataset template for deployment abc123 with 10 rows"
Use this skill when you need to:
Before making predictions, you need to understand what features a deployment requires:
Create properly formatted prediction datasets:
Validate datasets before making predictions:
Execute predictions using various methods:
User request: "I want to predict sales for next week for store_A with temperatures of 75°F each day and no promotions."
Agent workflow:
User request: "Score all records in my prediction_data.csv file using deployment abc123."
Agent workflow:
This skill guides you to use the DataRobot Python SDK directly. Install the SDK if needed:
pip install datarobot
Use these DataRobot SDK methods to work with predictions:
Deployment Information:
dr.Deployment.get(deployment_id) - Get deployment detailsdeployment.get_features() - Get required features (name/type/importance)Predictions:
deployment.predict_batch(source) - Convenience batch prediction API (CSV path, file object, or pandas DataFrame)dr.BatchPredictionJob.score(deployment=deployment, ...) - Advanced batch prediction controljob.get_result_when_complete() - Wait for batch scoring to finish and download resultsData Management:
dr.Dataset.create_from_file(file_path) - Upload datasetdr.Dataset.get(dataset_id) - Get dataset infoSee the Common Patterns section below for complete examples.
This skill includes executable helper scripts that Claude can run directly:
scripts/get_deployment_features.py - Get deployment feature requirementsscripts/generate_prediction_data_template.py - Generate CSV templatescripts/validate_prediction_data.py - Validate prediction datascripts/make_prediction.py - Make real-time predictionsUsage example:
# Get deployment features
python scripts/get_deployment_features.py abc123
# Generate template
python scripts/generate_prediction_data_template.py abc123 10 template.csv
# Validate data
python scripts/validate_prediction_data.py abc123 prediction_data.csv
# Make prediction
python scripts/make_prediction.py abc123 '{"feature1": 10, "feature2": 20}'
Claude can run these scripts directly or use them as reference when writing code.
import datarobot as dr
import os
import pandas as pd
# Initialize client
client = dr.Client(
token=os.getenv("DATAROBOT_API_TOKEN"),
endpoint=os.getenv("DATAROBOT_ENDPOINT")
)
# Get deployment (and optionally model metadata)
deployment = dr.Deployment.get("abc123")
model = dr.Model.get(deployment.model['id'])
# Get feature information
features = model.get_features()
feature_importance = model.get_feature_impact()
# Create prediction data
prediction_data = {
"feature1": value1,
"feature2": value2,
# ... all required features (excluding target)
}
# Make prediction (single-row batch prediction)
df = pd.DataFrame([prediction_data])
predictions_df = deployment.predict_batch(df)
print(predictions_df)
import datarobot as dr
import pandas as pd
import os
# Initialize client
client = dr.Client(
token=os.getenv("DATAROBOT_API_TOKEN"),
endpoint=os.getenv("DATAROBOT_ENDPOINT")
)
# Get deployment features
deployment = dr.Deployment.get("abc123")
model = dr.Model.get(deployment.model['id'])
features = model.get_features()
# Create template DataFrame
prediction_features = [f for f in features if f.name != model.target_name]
template_df = pd.DataFrame(columns=[f.name for f in prediction_features])
# Add sample rows
for i in range(100):
row = {}
for feature in prediction_features:
if feature.feature_type == 'Numeric':
row[feature.name] = 0.0
elif feature.feature_type == 'Categorical':
row[feature.name] = 'sample_value'
else:
row[feature.name] = ''
template_df = pd.concat([template_df, pd.DataFrame([row])], ignore_index=True)
# Save template
template_df.to_csv("prediction_template.csv", index=False)
# Fill template with actual data (modify CSV as needed)
# ...
# Submit batch prediction
job = dr.BatchPredictionJob.score(
deployment_id=deployment.id,
intake_settings={
'type': 'localFile',
'file': 'prediction_template.csv'
},
output_settings={
'type': 'localFile',
'path': 'predictions_output.csv'
}
)
# Monitor job
job_status = dr.BatchPredictionJob.get(job.id)
print(f"Job status: {job_status.status}")
# Download results when complete
if job_status.status == 'completed':
results = dr.BatchPredictionJob.download(job.id)
Common errors and solutions:
get_deployment_features to get complete listpip install datarobot
import datarobot as dr
import os
# Initialize client with API credentials
client = dr.Client(
token=os.getenv("DATAROBOT_API_TOKEN"),
endpoint=os.getenv("DATAROBOT_ENDPOINT", "https://app.datarobot.com")
)
Set these environment variables or pass them directly:
DATAROBOT_API_TOKEN - Your DataRobot API tokenDATAROBOT_ENDPOINT - Your DataRobot endpoint (default: https://app.datarobot.com)