datarobot-genai 0.2.34__py3-none-any.whl → 0.2.39__py3-none-any.whl
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/drmcp/tools/clients/microsoft_graph.py +171 -0
- datarobot_genai/drmcp/tools/confluence/tools.py +43 -89
- datarobot_genai/drmcp/tools/gdrive/tools.py +32 -74
- datarobot_genai/drmcp/tools/jira/tools.py +15 -33
- datarobot_genai/drmcp/tools/microsoft_graph/tools.py +152 -20
- datarobot_genai/drmcp/tools/predictive/deployment.py +52 -46
- datarobot_genai/drmcp/tools/predictive/deployment_info.py +100 -107
- datarobot_genai/drmcp/tools/predictive/training.py +38 -10
- {datarobot_genai-0.2.34.dist-info → datarobot_genai-0.2.39.dist-info}/METADATA +1 -1
- {datarobot_genai-0.2.34.dist-info → datarobot_genai-0.2.39.dist-info}/RECORD +14 -14
- {datarobot_genai-0.2.34.dist-info → datarobot_genai-0.2.39.dist-info}/WHEEL +0 -0
- {datarobot_genai-0.2.34.dist-info → datarobot_genai-0.2.39.dist-info}/entry_points.txt +0 -0
- {datarobot_genai-0.2.34.dist-info → datarobot_genai-0.2.39.dist-info}/licenses/AUTHORS +0 -0
- {datarobot_genai-0.2.34.dist-info → datarobot_genai-0.2.39.dist-info}/licenses/LICENSE +0 -0
|
@@ -19,6 +19,7 @@ import logging
|
|
|
19
19
|
from dataclasses import asdict
|
|
20
20
|
from dataclasses import dataclass
|
|
21
21
|
from typing import Annotated
|
|
22
|
+
from typing import Any
|
|
22
23
|
|
|
23
24
|
import pandas as pd
|
|
24
25
|
from fastmcp.exceptions import ToolError
|
|
@@ -56,6 +57,36 @@ class DatasetInsight:
|
|
|
56
57
|
missing_data_summary: dict[str, float]
|
|
57
58
|
|
|
58
59
|
|
|
60
|
+
def _get_dataset_or_raise(client: Any, dataset_id: str) -> tuple[Any, pd.DataFrame]:
|
|
61
|
+
"""Fetch dataset and return it with its dataframe, with proper error handling.
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
client: DataRobot SDK client instance
|
|
65
|
+
dataset_id: The ID of the dataset to fetch
|
|
66
|
+
|
|
67
|
+
Returns
|
|
68
|
+
-------
|
|
69
|
+
Tuple of (dataset object, dataframe)
|
|
70
|
+
|
|
71
|
+
Raises
|
|
72
|
+
------
|
|
73
|
+
ToolError: If dataset is not found (404) or other error occurs
|
|
74
|
+
"""
|
|
75
|
+
try:
|
|
76
|
+
dataset = client.Dataset.get(dataset_id)
|
|
77
|
+
return dataset, dataset.get_as_dataframe()
|
|
78
|
+
except Exception as e:
|
|
79
|
+
error_str = str(e)
|
|
80
|
+
# Check if it's a 404 error (dataset not found)
|
|
81
|
+
if "404" in error_str or "Not Found" in error_str:
|
|
82
|
+
raise ToolError(
|
|
83
|
+
f"Dataset '{dataset_id}' not found. Please verify the dataset ID exists "
|
|
84
|
+
"and you have access to it."
|
|
85
|
+
)
|
|
86
|
+
# For other errors, provide context
|
|
87
|
+
raise ToolError(f"Failed to retrieve dataset '{dataset_id}': {error_str}")
|
|
88
|
+
|
|
89
|
+
|
|
59
90
|
@dr_mcp_tool(tags={"predictive", "training", "read", "analysis", "dataset"})
|
|
60
91
|
async def analyze_dataset(
|
|
61
92
|
*,
|
|
@@ -66,8 +97,7 @@ async def analyze_dataset(
|
|
|
66
97
|
raise ToolError("Dataset ID must be provided")
|
|
67
98
|
|
|
68
99
|
client = get_sdk_client()
|
|
69
|
-
dataset = client
|
|
70
|
-
df = dataset.get_as_dataframe()
|
|
100
|
+
dataset, df = _get_dataset_or_raise(client, dataset_id)
|
|
71
101
|
|
|
72
102
|
# Analyze dataset structure
|
|
73
103
|
numerical_cols = df.select_dtypes(include=["int64", "float64"]).columns.tolist()
|
|
@@ -119,12 +149,11 @@ async def suggest_use_cases(
|
|
|
119
149
|
raise ToolError("Dataset ID must be provided")
|
|
120
150
|
|
|
121
151
|
client = get_sdk_client()
|
|
122
|
-
dataset = client
|
|
123
|
-
df = dataset.get_as_dataframe()
|
|
152
|
+
dataset, df = _get_dataset_or_raise(client, dataset_id)
|
|
124
153
|
|
|
125
154
|
# Get dataset insights first
|
|
126
|
-
|
|
127
|
-
insights =
|
|
155
|
+
insights_result = await analyze_dataset(dataset_id=dataset_id)
|
|
156
|
+
insights = insights_result.structured_content
|
|
128
157
|
|
|
129
158
|
suggestions = []
|
|
130
159
|
for target_col in insights["potential_targets"]:
|
|
@@ -151,12 +180,11 @@ async def get_exploratory_insights(
|
|
|
151
180
|
raise ToolError("Dataset ID must be provided")
|
|
152
181
|
|
|
153
182
|
client = get_sdk_client()
|
|
154
|
-
dataset = client
|
|
155
|
-
df = dataset.get_as_dataframe()
|
|
183
|
+
dataset, df = _get_dataset_or_raise(client, dataset_id)
|
|
156
184
|
|
|
157
185
|
# Get dataset insights first
|
|
158
|
-
|
|
159
|
-
insights =
|
|
186
|
+
insights_result = await analyze_dataset(dataset_id=dataset_id)
|
|
187
|
+
insights = insights_result.structured_content
|
|
160
188
|
|
|
161
189
|
eda_insights = {
|
|
162
190
|
"dataset_summary": {
|
|
@@ -84,25 +84,25 @@ datarobot_genai/drmcp/tools/clients/atlassian.py,sha256=__M_uz7FrcbKCYRzeMn24DCE
|
|
|
84
84
|
datarobot_genai/drmcp/tools/clients/confluence.py,sha256=h_G0By_kDnJeWDT_d-IREsaZ5-0xB5GoLXOqblYP5MA,20706
|
|
85
85
|
datarobot_genai/drmcp/tools/clients/gdrive.py,sha256=RK4IISpYb99aK6WgDthesDoglaZxwGpG_PPAAe6xsVM,33064
|
|
86
86
|
datarobot_genai/drmcp/tools/clients/jira.py,sha256=Rm91JAyrNIqxu66-9rU1YqoRXVnWbEy-Ahvy6f6HlVg,9823
|
|
87
|
-
datarobot_genai/drmcp/tools/clients/microsoft_graph.py,sha256=
|
|
87
|
+
datarobot_genai/drmcp/tools/clients/microsoft_graph.py,sha256=xh3J3QvBpsk-jO5tPIikn2AR1q5Fp3Z3_zdfb-C6UKE,25970
|
|
88
88
|
datarobot_genai/drmcp/tools/clients/s3.py,sha256=GmwzvurFdNfvxOooA8g5S4osRysHYU0S9ypg_177Glg,953
|
|
89
89
|
datarobot_genai/drmcp/tools/confluence/__init__.py,sha256=0kq9vMkF7EBsS6lkEdiLibmUrghTQqosHbZ5k-V9a5g,578
|
|
90
|
-
datarobot_genai/drmcp/tools/confluence/tools.py,sha256=
|
|
90
|
+
datarobot_genai/drmcp/tools/confluence/tools.py,sha256=tbZxpSkMqFWSz8HxCnjFuJ0JL06RD5t-B1alxxKnMl4,10314
|
|
91
91
|
datarobot_genai/drmcp/tools/gdrive/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
92
|
-
datarobot_genai/drmcp/tools/gdrive/tools.py,sha256=
|
|
92
|
+
datarobot_genai/drmcp/tools/gdrive/tools.py,sha256=38XxGXQHZcoX06HQDFf0-BFmpNxNG4wdvijaoqIM4ho,15572
|
|
93
93
|
datarobot_genai/drmcp/tools/jira/__init__.py,sha256=0kq9vMkF7EBsS6lkEdiLibmUrghTQqosHbZ5k-V9a5g,578
|
|
94
|
-
datarobot_genai/drmcp/tools/jira/tools.py,sha256=
|
|
94
|
+
datarobot_genai/drmcp/tools/jira/tools.py,sha256=qEQyyri2bPYpphDR9SVxon1_gTmBO2bPuP9nOLLYdk0,8775
|
|
95
95
|
datarobot_genai/drmcp/tools/microsoft_graph/__init__.py,sha256=CuOaMt1AJo7cHx_GuhO3s_aqxZas_wlDsoBorBsvbeU,577
|
|
96
|
-
datarobot_genai/drmcp/tools/microsoft_graph/tools.py,sha256=
|
|
96
|
+
datarobot_genai/drmcp/tools/microsoft_graph/tools.py,sha256=iQnmj-AEIVpGBVjlg2ogwDeHdQlTexdTQzX-DYQbFfQ,12479
|
|
97
97
|
datarobot_genai/drmcp/tools/predictive/__init__.py,sha256=WuOHlNNEpEmcF7gVnhckruJRKU2qtmJLE3E7zoCGLDo,1030
|
|
98
98
|
datarobot_genai/drmcp/tools/predictive/data.py,sha256=VbGs8ERP8vNFtTTryGhI61JItNVaJsx1gxpRX1ZFZcg,4626
|
|
99
|
-
datarobot_genai/drmcp/tools/predictive/deployment.py,sha256=
|
|
100
|
-
datarobot_genai/drmcp/tools/predictive/deployment_info.py,sha256=
|
|
99
|
+
datarobot_genai/drmcp/tools/predictive/deployment.py,sha256=Pc6lz9V2JOw3Ufw-SsGAhMKf6-YhvbjGoNLRFOIcSSY,3670
|
|
100
|
+
datarobot_genai/drmcp/tools/predictive/deployment_info.py,sha256=I9YxznndDOq0H2QgIjkb5O5sX8S6GTbYmXtRRYjEzOw,14778
|
|
101
101
|
datarobot_genai/drmcp/tools/predictive/model.py,sha256=BVxOMHh3--liwBU4VB1OWRrqkhJ4y_Rq053f7y94TF8,6276
|
|
102
102
|
datarobot_genai/drmcp/tools/predictive/predict.py,sha256=Qoob2_t2crfWtyPzkXMRz2ITZumnczU6Dq4C7q9RBMI,9370
|
|
103
103
|
datarobot_genai/drmcp/tools/predictive/predict_realtime.py,sha256=urq6rPyZFsAP-bPyclSNzrkvb6FTamdlFau8q0IWWJ0,13472
|
|
104
104
|
datarobot_genai/drmcp/tools/predictive/project.py,sha256=Mzf7rQogBV6h1-MWQYTwtDHOsMWfjOyyJpSYmmvNNuc,3253
|
|
105
|
-
datarobot_genai/drmcp/tools/predictive/training.py,sha256=
|
|
105
|
+
datarobot_genai/drmcp/tools/predictive/training.py,sha256=jeZGPWJ69PPOd2MhUbACgbllQ0CK7Kz-hNl596mJujQ,25021
|
|
106
106
|
datarobot_genai/langgraph/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
107
107
|
datarobot_genai/langgraph/agent.py,sha256=DRnywmS9KDywyChtuIZZwNKbJs8BpC259EG_kxYbiQ8,15828
|
|
108
108
|
datarobot_genai/langgraph/mcp.py,sha256=iA2_j46mZAaNaL7ntXT-LW6C-NMJkzr3VfKDDfe7mh8,2851
|
|
@@ -117,9 +117,9 @@ datarobot_genai/nat/datarobot_llm_clients.py,sha256=-_q_KlKOVQecIYJd8YRiYnS4ZNaz
|
|
|
117
117
|
datarobot_genai/nat/datarobot_llm_providers.py,sha256=aDoQcTeGI-odqydPXEX9OGGNFbzAtpqzTvHHEkmJuEQ,4963
|
|
118
118
|
datarobot_genai/nat/datarobot_mcp_client.py,sha256=jL8sXb8g4gvt0VYgB2tfMGsMjpB1GV2XIbN0iv_LxVU,10701
|
|
119
119
|
datarobot_genai/nat/helpers.py,sha256=Q7E3ADZdtFfS8E6OQPyw2wgA6laQ58N3bhLj5CBWwJs,3265
|
|
120
|
-
datarobot_genai-0.2.
|
|
121
|
-
datarobot_genai-0.2.
|
|
122
|
-
datarobot_genai-0.2.
|
|
123
|
-
datarobot_genai-0.2.
|
|
124
|
-
datarobot_genai-0.2.
|
|
125
|
-
datarobot_genai-0.2.
|
|
120
|
+
datarobot_genai-0.2.39.dist-info/METADATA,sha256=V8b_XudaiugsXFgEhkrtEpEr0UaSHVHLL6xPV578UGc,6301
|
|
121
|
+
datarobot_genai-0.2.39.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
122
|
+
datarobot_genai-0.2.39.dist-info/entry_points.txt,sha256=jEW3WxDZ8XIK9-ISmTyt5DbmBb047rFlzQuhY09rGrM,284
|
|
123
|
+
datarobot_genai-0.2.39.dist-info/licenses/AUTHORS,sha256=isJGUXdjq1U7XZ_B_9AH8Qf0u4eX0XyQifJZ_Sxm4sA,80
|
|
124
|
+
datarobot_genai-0.2.39.dist-info/licenses/LICENSE,sha256=U2_VkLIktQoa60Nf6Tbt7E4RMlfhFSjWjcJJfVC-YCE,11341
|
|
125
|
+
datarobot_genai-0.2.39.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|