Make all mark_* methods on BaseTrial no-op when status is unchanged#5097
Closed
lena-kashtelyan wants to merge 1 commit into
Closed
Make all mark_* methods on BaseTrial no-op when status is unchanged#5097lena-kashtelyan wants to merge 1 commit into
lena-kashtelyan wants to merge 1 commit into
Conversation
Summary: NOTE: Please see D97329836 for context; curious what folks think of this change. IMO applying the change in that diff only to `mark_as` will cause confusion in the future. ## Claude below Extend the no-op-on-same-status pattern from `mark_as` to every individual `mark_*` method on `BaseTrial`. This ensures that calling any status-marking method on a trial that is already in that status is a safe no-op that does not overwrite timestamps, regardless of whether the caller goes through `mark_as` or calls the specific method directly. Reviewed By: Cesar-Cardoso Differential Revision: D97785459
|
@lena-kashtelyan has exported this pull request. If you are a Meta employee, you can view the originating Diff in D97785459. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5097 +/- ##
==========================================
- Coverage 96.30% 96.29% -0.02%
==========================================
Files 611 611
Lines 67534 67549 +15
==========================================
+ Hits 65040 65047 +7
- Misses 2494 2502 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This pull request has been merged in e167d7c. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
NOTE: Please see D97329836 for context; curious what folks think of this change. IMO applying the change in that diff only to
mark_aswill cause confusion in the future.Claude below
Extend the no-op-on-same-status pattern from
mark_asto everyindividual
mark_*method onBaseTrial. This ensures that callingany status-marking method on a trial that is already in that status
is a safe no-op that does not overwrite timestamps, regardless of
whether the caller goes through
mark_asor calls the specificmethod directly.
Reviewed By: Cesar-Cardoso
Differential Revision: D97785459