diff --git a/.github/workflows/e2e-dashboard-tests.yml b/.github/workflows/e2e-dashboard-tests.yml index 0f293273..71d77f0e 100644 --- a/.github/workflows/e2e-dashboard-tests.yml +++ b/.github/workflows/e2e-dashboard-tests.yml @@ -6,8 +6,12 @@ on: paths: - '.github/workflows/e2e-dashboard-tests.yml' - '**.py' - - '**.ts' - - '**.tsx' + - 'tslib/**.ts' + - 'tslib/**.tsx' + - 'tslib/**/package.json' + - 'tslib/**/package-lock.json' + - 'optuna_dashboard/**.ts' + - 'optuna_dashboard/**.tsx' - 'optuna_dashboard/package.json' - 'optuna_dashboard/package-lock.json' - 'optuna_dashboard/tsconfig.json' @@ -37,7 +41,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '3.11' architecture: x64 - name: Setup Optuna ${{ matrix.optuna-version }} diff --git a/.github/workflows/e2e-standalone-tests.yml b/.github/workflows/e2e-standalone-tests.yml index d449e2b7..a599336b 100644 --- a/.github/workflows/e2e-standalone-tests.yml +++ b/.github/workflows/e2e-standalone-tests.yml @@ -5,6 +5,10 @@ on: - main paths: - '.github/workflows/e2e-standalone-tests.yml' + - 'tslib/**.ts' + - 'tslib/**.tsx' + - 'tslib/**/package.json' + - 'tslib/**/package-lock.json' - 'standalone_app/**.ts' - 'standalone_app/**.tsx' - 'standalone_app/package.json' @@ -34,7 +38,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '3.11' architecture: x64 - name: Setup Optuna ${{ matrix.optuna-version }} diff --git a/e2e_tests/test_dashboard/visual_regression_test.py b/e2e_tests/test_dashboard/visual_regression_test.py index ea6ff930..3ecb959d 100644 --- a/e2e_tests/test_dashboard/visual_regression_test.py +++ b/e2e_tests/test_dashboard/visual_regression_test.py @@ -192,33 +192,6 @@ def run_single_inf_report_objective_study( return study -def run_issue_410_objective_study(storage: optuna.storages.InMemoryStorage) -> optuna.Study: - # Issue 410 - sampler = optuna.samplers.RandomSampler(seed=0) - study = optuna.create_study(study_name="issue-410", storage=storage, sampler=sampler) - - def objective(trial: optuna.Trial) -> float: - trial.suggest_categorical("resample_rate", ["50ms"]) - trial.suggest_categorical("channels", ["all"]) - trial.suggest_categorical("window_size", [256]) - if trial.number > 15: - raise Exception("Unexpected error") - trial.suggest_categorical("cbow", [True]) - trial.suggest_categorical("model", ["m1"]) - - trial.set_user_attr("epochs", 0) - trial.set_user_attr("deterministic", True) - if trial.number > 10: - raise Exception("unexpeccted error") - trial.set_user_attr("folder", "/path/to/folder") - trial.set_user_attr("resample_type", "foo") - trial.set_user_attr("run_id", "0001") - return 1.0 - - study.optimize(objective, n_trials=20, catch=(Exception,)) - return study - - def run_single_no_trials_objective_study(storage: optuna.storages.InMemoryStorage) -> optuna.Study: # No trials single-objective study sampler = optuna.samplers.RandomSampler(seed=0) @@ -251,7 +224,6 @@ parameterize_studies = pytest.mark.parametrize( run_multi_dynamic_objective_study, run_single_pruned_without_report_objective_study, run_single_inf_report_objective_study, - run_issue_410_objective_study, run_single_no_trials_objective_study, run_multi_no_trials_objective_study, ], diff --git a/tslib/react/test/generate_assets.py b/tslib/react/test/generate_assets.py index f7bdc33f..49334263 100644 --- a/tslib/react/test/generate_assets.py +++ b/tslib/react/test/generate_assets.py @@ -447,6 +447,30 @@ def create_optuna_storage( trial.report(trial.number, step=0) trial.report(trial.number + 1, step=1) + # optuna-dashboard issue 410 + # https://github.com/optuna/optuna-dashboard/issues/410 + study = optuna.create_study(study_name="optuna-dashboard-issue-410", storage=storage, sampler=optuna.samplers.RandomSampler()) + + def objective_issue_410(trial: optuna.Trial) -> float: + trial.suggest_categorical("resample_rate", ["50ms"]) + trial.suggest_categorical("channels", ["all"]) + trial.suggest_categorical("window_size", [256]) + if trial.number > 15: + raise Exception("Unexpected error") + trial.suggest_categorical("cbow", [True]) + trial.suggest_categorical("model", ["m1"]) + + trial.set_user_attr("epochs", 0) + trial.set_user_attr("deterministic", True) + if trial.number > 10: + raise Exception("unexpeccted error") + trial.set_user_attr("folder", "/path/to/folder") + trial.set_user_attr("resample_type", "foo") + trial.set_user_attr("run_id", "0001") + return 1.0 + + study.optimize(objective_issue_410, n_trials=20, catch=(Exception,)) + def main() -> None: remove_assets()