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:
nabenabe0928
2024-01-19 09:01:15 +01:00
parent 4464ac5ea5
commit a7429318f3
9 changed files with 52 additions and 16 deletions
+2 -2
View File
@@ -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"]