diff --git a/optuna_dashboard/_app.py b/optuna_dashboard/_app.py index 650c040b6..1b279a8a6 100644 --- a/optuna_dashboard/_app.py +++ b/optuna_dashboard/_app.py @@ -516,19 +516,25 @@ def get_storage(storage: Union[str, BaseStorage]) -> BaseStorage: def run_server( - storage: Union[str, BaseStorage], host: str = "localhost", port: int = 8080 + storage: Union[str, BaseStorage], + host: str = "localhost", + port: int = 8080, + artifact_backend: Optional[ArtifactBackend] = None, ) -> None: """Start running optuna-dashboard and blocks until the server terminates. This function uses wsgiref module which is not intended for the production use. If you want to run optuna-dashboard more secure and/or more fast, please use WSGI server like Gunicorn or uWSGI via `wsgi()` function. """ - app = create_app(get_storage(storage)) + app = create_app(get_storage(storage), artifact_backend=artifact_backend) run(app, host=host, port=port) -def wsgi(storage: Union[str, BaseStorage]) -> WSGIApplication: +def wsgi( + storage: Union[str, BaseStorage], + artifact_backend: Optional[ArtifactBackend] = None, +) -> WSGIApplication: """This function exposes WSGI interface for people who want to run on the production-class WSGI servers like Gunicorn or uWSGI. """ - return create_app(get_storage(storage)) + return create_app(get_storage(storage), artifact_backend=artifact_backend) diff --git a/optuna_dashboard/ts/components/ObjectiveForm.tsx b/optuna_dashboard/ts/components/ObjectiveForm.tsx index 71c62e523..1d6d0b6f9 100644 --- a/optuna_dashboard/ts/components/ObjectiveForm.tsx +++ b/optuna_dashboard/ts/components/ObjectiveForm.tsx @@ -175,11 +175,23 @@ export const ObjectiveForm: FC<{ {getObjectiveName(i)} - {widget.description} - {widget.choices.map((c, i) => ( + {widget.choices.map((c, j) => ( } + control={ + { + const selected = widget.values.at(j) + if (e.target.checked) { + setValue( + i, + selected === undefined ? null : selected + ) + } + }} + /> + } label={c} /> ))} @@ -194,6 +206,10 @@ export const ObjectiveForm: FC<{ { + // @ts-ignore + setValue(i, e.target.value as number) + }} defaultValue={widget.min} min={widget.min} max={widget.max} diff --git a/optuna_dashboard/ts/components/StudyDetailBeta.tsx b/optuna_dashboard/ts/components/StudyDetailBeta.tsx index a2809f51a..400fa5cd8 100644 --- a/optuna_dashboard/ts/components/StudyDetailBeta.tsx +++ b/optuna_dashboard/ts/components/StudyDetailBeta.tsx @@ -60,7 +60,7 @@ export const StudyDetailBeta: FC<{ }, []) useEffect(() => { - if (reloadInterval < 0 || page === "trialTable" || page === "trialList") { + if (reloadInterval < 0 || page === "trialTable") { return } const intervalId = setInterval(function () {