Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add E2E tests for preferential optimization #691

Conversation

HideakiImamura
Copy link
Member

Contributor License Agreement

This repository (optuna-dashboard) and Goptuna share common code.
This pull request may therefore be ported to Goptuna.
Make sure that you understand the consequences concerning licenses and check the box below if you accept the term before creating this pull request.

  • I agree this patch may be ported to Goptuna by other Goptuna contributors.

Reference Issues/PRs

Following #484, I add e2e tests using playwright for preferential optimization.

What does this implement/fix? Explain your changes.

This PR adds the e2e test file test_preferential_optimization.py. This tests the followings.

  • Accessing the trial list page and confirm that the trial list page is displayed. Check that all trials are running.
  • The first trial are marks as completed with "Bad" feedback. Check that it is completed and the best trial.
  • The second trial are marks as completed with "So-so" feedback. Check that it is completed and the best trial.
  • The third trial are marks as completed with "Good" feedback. Check that it is completed and the best trial.
  • The fourth trial are marks as failed. Check that it is failed.

The following screenshot was generated by the playwright --screenshot on option.
test-finished-1

@HideakiImamura
Copy link
Member Author

@keisuke-umezawa Could you review this PR?

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #691 (e10a53c) into main (6bec7e3) will not change coverage.
Report is 42 commits behind head on main.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #691   +/-   ##
=======================================
  Coverage   62.88%   62.88%           
=======================================
  Files          35       35           
  Lines        2250     2250           
=======================================
  Hits         1415     1415           
  Misses        835      835           

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@keisuke-umezawa
Copy link
Member

@HideakiImamura Seems not to work with optuna==2.10.0. Could you check the code?

@HideakiImamura
Copy link
Member Author

HideakiImamura commented Nov 13, 2023

optuna==2.10.0 does not support the preferential optimization since it has been introduced in optuna==3.2.0 with database schema changes, so the error occurs. I think we should skip the tests.

@keisuke-umezawa
Copy link
Member

@HideakiImamura
Thank you for the explanation. I understand. I will check this PR.

Copy link
Member

@keisuke-umezawa keisuke-umezawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great example of e2e test! Thank you.

@@ -83,6 +83,7 @@ $ pytest python_tests/

```
$ pip install -r requirements.txt
$ playwright install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx!

@keisuke-umezawa keisuke-umezawa merged commit 811cab8 into optuna:main Nov 16, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants