mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-09 11:28:14 +08:00
Limit the maximum number of trials to be used for one update
More specifically, this PR makes the following changes: 1. Add query param for limit, 2. Update studyDetails only if there is no study with the specified study_id or the fetched trials has a positive length, 3. Shorten the waiting interval when there is a leftover in the server side, and 4. Adapt the flake8 setup to the Optuna repo.
This commit is contained in:
@@ -61,7 +61,7 @@ def test_get_study_detail_is_preferential() -> None:
|
||||
|
||||
study_summary = study_summaries[0]
|
||||
study_detail = serialize_study_detail(
|
||||
study_summary, [], study.trials, [], [], [], False, {}, []
|
||||
study_summary, [], study.trials, [], [], [], False, {}, [], False
|
||||
)
|
||||
assert study_detail["is_preferential"]
|
||||
|
||||
@@ -74,7 +74,7 @@ def test_get_study_detail_is_not_preferential() -> None:
|
||||
|
||||
study_summary = study_summaries[0]
|
||||
study_detail = serialize_study_detail(
|
||||
study_summary, [], study.trials, [], [], [], False, {}, []
|
||||
study_summary, [], study.trials, [], [], [], False, {}, [], False
|
||||
)
|
||||
assert not study_detail["is_preferential"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user