optuna_dashboard.TextInputWidget
- class optuna_dashboard.TextInputWidget(description=None, user_attr_key=None, optional=False)
A text input widget class that defines a text input field.
- Parameters:
description (Optional[str]) – A description of the text input field.
user_attr_key (Optional[str]) – The key used by register_user_attr_form_widgets. Form output is saved as trial.user_attrs[user_attr_key]. Defaults to None.
optional (bool) – If True, an empty string is acceptable.
Example
from optuna_dashboard import TextInputWidget text_input = TextInputWidget(description="Text Input Example")
Methods
to_dict
()Converts the TextInputWidget instance to a dictionary representation.
Attributes
description
optional
user_attr_key
- to_dict()
Converts the TextInputWidget instance to a dictionary representation.
- Returns:
The dictionary representation of the TextInputWidget instance.
- Return type:
TextInputWidgetJSON