Skip to content

Improve test cases for n_recent_trials of plot_timeline (follow-up #6110).#6116

Merged
nabenabe0928 merged 1 commit intooptuna:masterfrom
toshihikoyanase:follow-up-6110
Jun 4, 2025
Merged

Improve test cases for n_recent_trials of plot_timeline (follow-up #6110).#6116
nabenabe0928 merged 1 commit intooptuna:masterfrom
toshihikoyanase:follow-up-6110

Conversation

@toshihikoyanase
Copy link
Copy Markdown
Member

Motivation

This is a follow-up PR for #6110. Some test cases for the plot_timeline function can be improved, such as

  • the n_recent_trials argument is not used in test_get_timeline_plot,
  • the case n_recent_trials=0 will raise ValueError, and it should be handled by test_plot_timeline_n_recent_trials_invalid, not test_get_timeline_plot,
  • and we'd like to avoid exact matching of the error message since it can be fragile

Description of the changes

  • Update test cases for optuna.visualization.plot_timeline

@toshihikoyanase toshihikoyanase added the test Unit test. label May 31, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented May 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.37%. Comparing base (12e8fc5) to head (91dd8f2).
⚠️ Report is 511 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6116      +/-   ##
==========================================
+ Coverage   88.35%   88.37%   +0.01%     
==========================================
  Files         207      207              
  Lines       14010    14010              
==========================================
+ Hits        12379    12381       +2     
+ Misses       1631     1629       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@toshihikoyanase toshihikoyanase added the sprint-20250531 PR from the online sprint event May 31, 2025. label May 31, 2025
Copy link
Copy Markdown
Member

@HideakiImamura HideakiImamura left a comment

Choose a reason for hiding this comment

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

LGTM.

@y0z
Copy link
Copy Markdown
Member

y0z commented Jun 3, 2025

@kAIto47802 Could you review this PR?

Copy link
Copy Markdown
Contributor

@nabenabe0928 nabenabe0928 left a comment

Choose a reason for hiding this comment

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

LGTM!

@nabenabe0928 nabenabe0928 merged commit 5d067f5 into optuna:master Jun 4, 2025
18 checks passed
@nabenabe0928 nabenabe0928 added this to the v4.4.0 milestone Jun 4, 2025
@nabenabe0928 nabenabe0928 removed their assignment Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sprint-20250531 PR from the online sprint event May 31, 2025. test Unit test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants