datarobot-genai 0.2.23__tar.gz → 0.2.24__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/PKG-INFO +1 -1
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/pyproject.toml +1 -1
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/predictive/training.py +160 -151
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/.gitignore +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/AUTHORS +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/LICENSE +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/README.md +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/agents/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/agents/base.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/chat/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/chat/auth.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/chat/client.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/chat/responses.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/cli/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/cli/agent_environment.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/cli/agent_kernel.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/custom_model.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/mcp/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/mcp/common.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/telemetry_agent.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/utils/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/utils/auth.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/utils/urls.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/crewai/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/crewai/agent.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/crewai/base.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/crewai/events.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/crewai/mcp.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/auth.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/clients.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/config.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/config_utils.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/constants.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/credentials.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dr_mcp_server.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dr_mcp_server_logo.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_prompts/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_prompts/controllers.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_prompts/dr_lib.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_prompts/register.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_prompts/utils.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_tools/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/adapters/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/adapters/base.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/adapters/default.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/adapters/drum.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/config.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/controllers.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/metadata.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/register.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/schemas/drum_agentic_fallback_schema.json +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/schemas/drum_prediction_fallback_schema.json +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_tools/register.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dynamic_tools/schema.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/exceptions.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/logging.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/mcp_instance.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/mcp_server_tools.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/memory_management/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/memory_management/manager.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/memory_management/memory_tools.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/routes.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/routes_utils.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/server_life_cycle.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/telemetry.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/tool_config.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/tool_filter.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/utils.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/server.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/test_utils/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/test_utils/elicitation_test_tool.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/test_utils/integration_mcp_server.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/test_utils/mcp_utils_ete.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/test_utils/mcp_utils_integration.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/test_utils/openai_llm_mcp_client.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/test_utils/test_interactive.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/test_utils/tool_base_ete.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/test_utils/utils.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/clients/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/clients/atlassian.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/clients/confluence.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/clients/gdrive.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/clients/jira.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/clients/s3.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/confluence/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/confluence/tools.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/gdrive/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/gdrive/tools.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/jira/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/jira/tools.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/predictive/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/predictive/data.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/predictive/deployment.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/predictive/deployment_info.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/predictive/model.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/predictive/predict.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/predictive/predict_realtime.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/predictive/project.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/langgraph/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/langgraph/agent.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/langgraph/mcp.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/llama_index/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/llama_index/agent.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/llama_index/base.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/llama_index/mcp.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/nat/__init__.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/nat/agent.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/nat/datarobot_auth_provider.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/nat/datarobot_llm_clients.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/nat/datarobot_llm_providers.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/nat/datarobot_mcp_client.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/nat/helpers.py +0 -0
- {datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/py.typed +0 -0
|
@@ -18,8 +18,11 @@ import json
|
|
|
18
18
|
import logging
|
|
19
19
|
from dataclasses import asdict
|
|
20
20
|
from dataclasses import dataclass
|
|
21
|
+
from typing import Annotated
|
|
21
22
|
|
|
22
23
|
import pandas as pd
|
|
24
|
+
from fastmcp.exceptions import ToolError
|
|
25
|
+
from fastmcp.tools.tool import ToolResult
|
|
23
26
|
|
|
24
27
|
from datarobot_genai.drmcp.core.clients import get_sdk_client
|
|
25
28
|
from datarobot_genai.drmcp.core.mcp_instance import dr_mcp_tool
|
|
@@ -53,22 +56,15 @@ class DatasetInsight:
|
|
|
53
56
|
missing_data_summary: dict[str, float]
|
|
54
57
|
|
|
55
58
|
|
|
56
|
-
@dr_mcp_tool(tags={"training", "analysis", "dataset"})
|
|
57
|
-
async def analyze_dataset(
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
@dr_mcp_tool(tags={"predictive", "training", "read", "analysis", "dataset"})
|
|
60
|
+
async def analyze_dataset(
|
|
61
|
+
*,
|
|
62
|
+
dataset_id: Annotated[str, "The ID of the DataRobot dataset to analyze"] | None = None,
|
|
63
|
+
) -> ToolError | ToolResult:
|
|
64
|
+
"""Analyze a dataset to understand its structure and potential use cases."""
|
|
65
|
+
if not dataset_id:
|
|
66
|
+
return ToolError("Dataset ID must be provided")
|
|
60
67
|
|
|
61
|
-
Args:
|
|
62
|
-
dataset_id: The ID of the DataRobot dataset to analyze
|
|
63
|
-
|
|
64
|
-
Returns
|
|
65
|
-
-------
|
|
66
|
-
JSON string containing dataset insights including:
|
|
67
|
-
- Basic statistics (rows, columns)
|
|
68
|
-
- Column types (numerical, categorical, datetime, text)
|
|
69
|
-
- Potential target columns
|
|
70
|
-
- Missing data summary
|
|
71
|
-
"""
|
|
72
68
|
client = get_sdk_client()
|
|
73
69
|
dataset = client.Dataset.get(dataset_id)
|
|
74
70
|
df = dataset.get_as_dataframe()
|
|
@@ -105,27 +101,23 @@ async def analyze_dataset(dataset_id: str) -> str:
|
|
|
105
101
|
potential_targets=potential_targets,
|
|
106
102
|
missing_data_summary=missing_data,
|
|
107
103
|
)
|
|
104
|
+
insights_dict = asdict(insights)
|
|
108
105
|
|
|
109
|
-
return
|
|
110
|
-
|
|
106
|
+
return ToolResult(
|
|
107
|
+
content=json.dumps(insights_dict, indent=2),
|
|
108
|
+
structured_content=insights_dict,
|
|
109
|
+
)
|
|
111
110
|
|
|
112
|
-
@dr_mcp_tool(tags={"training", "analysis", "usecase"})
|
|
113
|
-
async def suggest_use_cases(dataset_id: str) -> str:
|
|
114
|
-
"""
|
|
115
|
-
Analyze a dataset and suggest potential machine learning use cases.
|
|
116
111
|
|
|
117
|
-
|
|
118
|
-
|
|
112
|
+
@dr_mcp_tool(tags={"predictive", "training", "read", "analysis", "usecase"})
|
|
113
|
+
async def suggest_use_cases(
|
|
114
|
+
*,
|
|
115
|
+
dataset_id: Annotated[str, "The ID of the DataRobot dataset to analyze"] | None = None,
|
|
116
|
+
) -> ToolError | ToolResult:
|
|
117
|
+
"""Analyze a dataset and suggest potential machine learning use cases."""
|
|
118
|
+
if not dataset_id:
|
|
119
|
+
return ToolError("Dataset ID must be provided")
|
|
119
120
|
|
|
120
|
-
Returns
|
|
121
|
-
-------
|
|
122
|
-
JSON string containing suggested use cases with:
|
|
123
|
-
- Use case name and description
|
|
124
|
-
- Suggested target column
|
|
125
|
-
- Problem type
|
|
126
|
-
- Confidence score
|
|
127
|
-
- Reasoning for the suggestion
|
|
128
|
-
"""
|
|
129
121
|
client = get_sdk_client()
|
|
130
122
|
dataset = client.Dataset.get(dataset_id)
|
|
131
123
|
df = dataset.get_as_dataframe()
|
|
@@ -141,27 +133,23 @@ async def suggest_use_cases(dataset_id: str) -> str:
|
|
|
141
133
|
|
|
142
134
|
# Sort by confidence score
|
|
143
135
|
suggestions.sort(key=lambda x: x["confidence"], reverse=True)
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
- Feature correlations with target
|
|
162
|
-
- Missing data analysis
|
|
163
|
-
- Data type distribution
|
|
164
|
-
"""
|
|
136
|
+
|
|
137
|
+
return ToolResult(
|
|
138
|
+
content=json.dumps(suggestions, indent=2),
|
|
139
|
+
structured_content={"use_case_suggestions": suggestions},
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
@dr_mcp_tool(tags={"predictive", "training", "read", "analysis", "eda"})
|
|
144
|
+
async def get_exploratory_insights(
|
|
145
|
+
*,
|
|
146
|
+
dataset_id: Annotated[str, "The ID of the DataRobot dataset to analyze"] | None = None,
|
|
147
|
+
target_col: Annotated[str, "Optional target column to focus EDA insights on"] | None = None,
|
|
148
|
+
) -> ToolError | ToolResult:
|
|
149
|
+
"""Generate exploratory data insights for a dataset."""
|
|
150
|
+
if not dataset_id:
|
|
151
|
+
return ToolError("Dataset ID must be provided")
|
|
152
|
+
|
|
165
153
|
client = get_sdk_client()
|
|
166
154
|
dataset = client.Dataset.get(dataset_id)
|
|
167
155
|
df = dataset.get_as_dataframe()
|
|
@@ -238,8 +226,10 @@ async def get_exploratory_insights(dataset_id: str, target_col: str | None = Non
|
|
|
238
226
|
sorted(correlations.items(), key=lambda x: abs(x[1]), reverse=True)
|
|
239
227
|
)
|
|
240
228
|
|
|
241
|
-
|
|
242
|
-
|
|
229
|
+
return ToolResult(
|
|
230
|
+
content=json.dumps(eda_insights, indent=2),
|
|
231
|
+
structured_content=eda_insights,
|
|
232
|
+
)
|
|
243
233
|
|
|
244
234
|
|
|
245
235
|
def _identify_potential_targets(
|
|
@@ -450,47 +440,50 @@ def _analyze_target_for_use_cases(df: pd.DataFrame, target_col: str) -> list[Use
|
|
|
450
440
|
return suggestions
|
|
451
441
|
|
|
452
442
|
|
|
453
|
-
@dr_mcp_tool(tags={"training", "autopilot", "model"})
|
|
443
|
+
@dr_mcp_tool(tags={"predictive", "training", "write", "autopilot", "model"})
|
|
454
444
|
async def start_autopilot(
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
445
|
+
*,
|
|
446
|
+
target: Annotated[str, "Name of the target column for modeling"] | None = None,
|
|
447
|
+
project_id: Annotated[
|
|
448
|
+
str, "Optional, the ID of the DataRobot project or a new project if no id is provided"
|
|
449
|
+
]
|
|
450
|
+
| None = None,
|
|
451
|
+
mode: Annotated[str, "Optional, Autopilot mode ('quick', 'comprehensive', or 'manual')"]
|
|
452
|
+
| None = "quick",
|
|
453
|
+
dataset_url: Annotated[
|
|
454
|
+
str,
|
|
455
|
+
"""
|
|
456
|
+
Optional, The URL to the dataset to upload
|
|
457
|
+
(optional if dataset_id is provided) for a new project.
|
|
458
|
+
""",
|
|
459
|
+
]
|
|
460
|
+
| None = None,
|
|
461
|
+
dataset_id: Annotated[
|
|
462
|
+
str,
|
|
463
|
+
"""
|
|
464
|
+
Optional, The ID of an existing dataset in AI Catalog
|
|
465
|
+
(optional if dataset_url is provided) for a new project.
|
|
466
|
+
""",
|
|
467
|
+
]
|
|
468
|
+
| None = None,
|
|
469
|
+
project_name: Annotated[
|
|
470
|
+
str, "Optional, name for the project if no id is provided, creates a new project"
|
|
471
|
+
]
|
|
472
|
+
| None = "MCP Project",
|
|
473
|
+
use_case_id: Annotated[
|
|
474
|
+
str,
|
|
475
|
+
"Optional, ID of the use case to associate this project (required for next-gen platform)",
|
|
476
|
+
]
|
|
477
|
+
| None = None,
|
|
478
|
+
) -> ToolError | ToolResult:
|
|
479
|
+
"""Start automated model training (Autopilot) for a project."""
|
|
487
480
|
client = get_sdk_client()
|
|
488
481
|
|
|
489
482
|
if not project_id:
|
|
490
483
|
if not dataset_url and not dataset_id:
|
|
491
|
-
return "
|
|
484
|
+
return ToolError("Either dataset_url or dataset_id must be provided")
|
|
492
485
|
if dataset_url and dataset_id:
|
|
493
|
-
return "
|
|
486
|
+
return ToolError("Please provide either dataset_url or dataset_id, not both")
|
|
494
487
|
|
|
495
488
|
if dataset_url:
|
|
496
489
|
dataset = client.Dataset.create_from_url(dataset_url)
|
|
@@ -504,7 +497,7 @@ async def start_autopilot(
|
|
|
504
497
|
project = client.Project.get(project_id)
|
|
505
498
|
|
|
506
499
|
if not target:
|
|
507
|
-
return "
|
|
500
|
+
return ToolError("Target variable must be specified")
|
|
508
501
|
|
|
509
502
|
try:
|
|
510
503
|
# Start modeling
|
|
@@ -515,40 +508,48 @@ async def start_autopilot(
|
|
|
515
508
|
"target": target,
|
|
516
509
|
"mode": mode,
|
|
517
510
|
"status": project.get_status(),
|
|
518
|
-
"ui_panel": ["eda", "model-training", "leaderboard"],
|
|
519
511
|
"use_case_id": project.use_case_id,
|
|
520
512
|
}
|
|
521
513
|
|
|
522
|
-
return
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
{
|
|
526
|
-
"error": f"Failed to start Autopilot: {str(e)}",
|
|
527
|
-
"project_id": project.id,
|
|
528
|
-
"target": target,
|
|
529
|
-
"mode": mode,
|
|
530
|
-
},
|
|
531
|
-
indent=2,
|
|
514
|
+
return ToolResult(
|
|
515
|
+
content=json.dumps(result, indent=2),
|
|
516
|
+
structured_content=result,
|
|
532
517
|
)
|
|
533
518
|
|
|
519
|
+
except Exception as e:
|
|
520
|
+
return ToolError(
|
|
521
|
+
content=json.dumps(
|
|
522
|
+
{
|
|
523
|
+
"error": f"Failed to start Autopilot: {str(e)}",
|
|
524
|
+
"project_id": project.id if project else None,
|
|
525
|
+
"target": target,
|
|
526
|
+
"mode": mode,
|
|
527
|
+
},
|
|
528
|
+
indent=2,
|
|
529
|
+
)
|
|
530
|
+
)
|
|
534
531
|
|
|
535
|
-
@dr_mcp_tool(tags={"training", "model", "evaluation"})
|
|
536
|
-
async def get_model_roc_curve(project_id: str, model_id: str, source: str = "validation") -> str:
|
|
537
|
-
"""
|
|
538
|
-
Get detailed ROC curve for a specific model.
|
|
539
532
|
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
533
|
+
@dr_mcp_tool(tags={"prediction", "training", "read", "model", "evaluation"})
|
|
534
|
+
async def get_model_roc_curve(
|
|
535
|
+
*,
|
|
536
|
+
project_id: Annotated[str, "The ID of the DataRobot project"] | None = None,
|
|
537
|
+
model_id: Annotated[str, "The ID of the model to analyze"] | None = None,
|
|
538
|
+
source: Annotated[
|
|
539
|
+
str,
|
|
540
|
+
"""
|
|
541
|
+
The source of the data to use for the ROC curve
|
|
542
|
+
('validation' or 'holdout' or 'crossValidation')
|
|
543
|
+
""",
|
|
544
|
+
]
|
|
545
|
+
| str = "validation",
|
|
546
|
+
) -> ToolError | ToolResult:
|
|
547
|
+
"""Get detailed ROC curve for a specific model."""
|
|
548
|
+
if not project_id:
|
|
549
|
+
return ToolError("Project ID must be provided")
|
|
550
|
+
if not model_id:
|
|
551
|
+
return ToolError("Model ID must be provided")
|
|
545
552
|
|
|
546
|
-
Returns
|
|
547
|
-
-------
|
|
548
|
-
JSON string containing:
|
|
549
|
-
- roc_curve: ROC curve data
|
|
550
|
-
- ui_panel: List of recommended UI panels for visualization
|
|
551
|
-
"""
|
|
552
553
|
client = get_sdk_client()
|
|
553
554
|
project = client.Project.get(project_id)
|
|
554
555
|
model = client.Model.get(project=project, model_id=model_id)
|
|
@@ -581,26 +582,26 @@ async def get_model_roc_curve(project_id: str, model_id: str, source: str = "val
|
|
|
581
582
|
"source": source,
|
|
582
583
|
}
|
|
583
584
|
|
|
584
|
-
return
|
|
585
|
+
return ToolResult(
|
|
586
|
+
content=json.dumps({"data": roc_data}, indent=2),
|
|
587
|
+
structured_content={"data": roc_data},
|
|
588
|
+
)
|
|
585
589
|
except Exception as e:
|
|
586
|
-
return
|
|
590
|
+
return ToolError(f"Failed to get ROC curve: {str(e)}")
|
|
587
591
|
|
|
588
592
|
|
|
589
|
-
@dr_mcp_tool(tags={"training", "model", "evaluation"})
|
|
590
|
-
async def get_model_feature_impact(
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
593
|
+
@dr_mcp_tool(tags={"predictive", "training", "read", "model", "evaluation"})
|
|
594
|
+
async def get_model_feature_impact(
|
|
595
|
+
*,
|
|
596
|
+
project_id: Annotated[str, "The ID of the DataRobot project"] | None = None,
|
|
597
|
+
model_id: Annotated[str, "The ID of the model to analyze"] | None = None,
|
|
598
|
+
) -> ToolError | ToolResult:
|
|
599
|
+
"""Get detailed feature impact for a specific model."""
|
|
600
|
+
if not project_id:
|
|
601
|
+
return ToolError("Project ID must be provided")
|
|
602
|
+
if not model_id:
|
|
603
|
+
return ToolError("Model ID must be provided")
|
|
597
604
|
|
|
598
|
-
Returns
|
|
599
|
-
-------
|
|
600
|
-
JSON string containing:
|
|
601
|
-
- feature_impact: Feature importance scores
|
|
602
|
-
- ui_panel: List of recommended UI panels for visualization
|
|
603
|
-
"""
|
|
604
605
|
client = get_sdk_client()
|
|
605
606
|
project = client.Project.get(project_id)
|
|
606
607
|
model = client.Model.get(project=project, model_id=model_id)
|
|
@@ -608,26 +609,31 @@ async def get_model_feature_impact(project_id: str, model_id: str) -> str:
|
|
|
608
609
|
model.request_feature_impact()
|
|
609
610
|
feature_impact = model.get_or_request_feature_impact()
|
|
610
611
|
|
|
611
|
-
return
|
|
612
|
-
|
|
612
|
+
return ToolResult(
|
|
613
|
+
content=json.dumps({"data": feature_impact}, indent=2),
|
|
614
|
+
structured_content={"data": feature_impact},
|
|
615
|
+
)
|
|
613
616
|
|
|
614
|
-
@dr_mcp_tool(tags={"training", "model", "evaluation"})
|
|
615
|
-
async def get_model_lift_chart(project_id: str, model_id: str, source: str = "validation") -> str:
|
|
616
|
-
"""
|
|
617
|
-
Get detailed lift chart for a specific model.
|
|
618
617
|
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
618
|
+
@dr_mcp_tool(tags={"predictive", "training", "read", "model", "evaluation"})
|
|
619
|
+
async def get_model_lift_chart(
|
|
620
|
+
project_id: Annotated[str, "The ID of the DataRobot project"] | None = None,
|
|
621
|
+
model_id: Annotated[str, "The ID of the model to analyze"] | None = None,
|
|
622
|
+
source: Annotated[
|
|
623
|
+
str,
|
|
624
|
+
"""
|
|
625
|
+
The source of the data to use for the lift chart
|
|
626
|
+
('validation' or 'holdout' or 'crossValidation')
|
|
627
|
+
""",
|
|
628
|
+
]
|
|
629
|
+
| str = "validation",
|
|
630
|
+
) -> ToolError | ToolResult:
|
|
631
|
+
"""Get detailed lift chart for a specific model."""
|
|
632
|
+
if not project_id:
|
|
633
|
+
return ToolError("Project ID must be provided")
|
|
634
|
+
if not model_id:
|
|
635
|
+
return ToolError("Model ID must be provided")
|
|
624
636
|
|
|
625
|
-
Returns
|
|
626
|
-
-------
|
|
627
|
-
JSON string containing:
|
|
628
|
-
- lift_chart: Lift chart data
|
|
629
|
-
- ui_panel: List of recommended UI panels for visualization
|
|
630
|
-
"""
|
|
631
637
|
client = get_sdk_client()
|
|
632
638
|
project = client.Project.get(project_id)
|
|
633
639
|
model = client.Model.get(project=project, model_id=model_id)
|
|
@@ -648,4 +654,7 @@ async def get_model_lift_chart(project_id: str, model_id: str, source: str = "va
|
|
|
648
654
|
"target_class": lift_chart.target_class,
|
|
649
655
|
}
|
|
650
656
|
|
|
651
|
-
return
|
|
657
|
+
return ToolResult(
|
|
658
|
+
content=json.dumps({"data": lift_chart_data}, indent=2),
|
|
659
|
+
structured_content={"data": lift_chart_data},
|
|
660
|
+
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/agents/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/chat/responses.py
RENAMED
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/cli/agent_environment.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/cli/agent_kernel.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/telemetry_agent.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/core/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/config_utils.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/constants.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/credentials.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/dr_mcp_server.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/mcp_instance.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/mcp_server_tools.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/routes_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/telemetry.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/tool_config.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/core/tool_filter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/test_utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/test_utils/utils.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/clients/gdrive.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/clients/jira.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/clients/s3.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/gdrive/__init__.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/gdrive/tools.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/jira/__init__.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/jira/tools.py
RENAMED
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/drmcp/tools/predictive/data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/llama_index/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/nat/datarobot_auth_provider.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/nat/datarobot_llm_clients.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/nat/datarobot_llm_providers.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.23 → datarobot_genai-0.2.24}/src/datarobot_genai/nat/datarobot_mcp_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|