Skip to content

Emit ExperimentalWarning if heartbeat is enabled#6106

Merged
contramundum53 merged 2 commits intooptuna:masterfrom
lan496:warn-heartbeat
May 31, 2025
Merged

Emit ExperimentalWarning if heartbeat is enabled#6106
contramundum53 merged 2 commits intooptuna:masterfrom
lan496:warn-heartbeat

Conversation

@lan496
Copy link
Copy Markdown
Contributor

@lan496 lan496 commented May 31, 2025

Motivation

When we use the heartbeat mechanism of RDBStorage, only fail_stale_trials emits ExperimentalWarning currently.
Because the heartbeat mechanism itself is an experimental feature at this moment, it is more helpful to emit an ExperimentalWarning more holistically.

Description of the changes

This PR emits ExperimentalWarning at initializing RDBStorage with heartbeat_interval.

This PR does not address the existing ExperimentalWarning from fail_stale_trials. Thus, we will see two distinct ExperimentalWarning if we use fail_stale_trials.

@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.25%. Comparing base (e1e30e7) to head (19902c9).
Report is 19 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6106      +/-   ##
==========================================
- Coverage   88.35%   88.25%   -0.10%     
==========================================
  Files         207      207              
  Lines       13995    14002       +7     
==========================================
- Hits        12365    12358       -7     
- Misses       1630     1644      +14     

☔ 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
@lan496 lan496 marked this pull request as ready for review May 31, 2025 03:51
@contramundum53
Copy link
Copy Markdown
Member

LGTM.
Maybe we should document in the Storage class that heartbeat is experimental.

@contramundum53
Copy link
Copy Markdown
Member

Since this PR is small, I'll merge it with one approval.

@contramundum53 contramundum53 merged commit f8d77da into optuna:master May 31, 2025
14 checks passed
@toshihikoyanase toshihikoyanase added this to the v4.4.0 milestone May 31, 2025
@toshihikoyanase toshihikoyanase added the code-fix Change that does not change the behavior, such as code refactoring. label May 31, 2025
@not522 not522 changed the title Emit ExperimentalWarning if heartbeat is enabled Emit ExperimentalWarning if heartbeat is enabled May 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-fix Change that does not change the behavior, such as code refactoring. sprint-20250531 PR from the online sprint event May 31, 2025.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants