You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: optuna_mcp/server.py
+36-17Lines changed: 36 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,8 @@
10
10
importoptuna
11
11
importoptuna_dashboard
12
12
importplotly
13
-
frompydanticimportBaseModel, Field
13
+
frompydanticimportBaseModel
14
+
frompydanticimportField
14
15
15
16
16
17
classOptunaMCP(FastMCP):
@@ -59,17 +60,32 @@ class TrialToAdd:
59
60
user_attrs: dict[str, typing.Any] |None
60
61
system_attrs: dict[str, typing.Any] |None
61
62
63
+
62
64
classStudyInfo(BaseModel):
63
65
study_name: str
64
-
sampler_name: typing.Literal["TPESampler", "NSGAIISampler", "RandomSampler", "GPSampler"] |None=Field(default=None, description="The name of the sampler used in the study, if available.")
65
-
directions: list[typing.Literal["minimize", "maximize"]] |None=Field(default=None, description="The optimization directions for each objective, if available.")
0 commit comments