Phase 4: Exception Groups Migration (PEP 654)#4877
Closed
Balandat wants to merge 1 commit into
Closed
Conversation
Summary: Convert error collection patterns to use Python 3.11 ExceptionGroup instead of ad-hoc exception aggregation. This provides better structured exception handling and enables the use of except* syntax in callers. Files changed: - ax/core/metric.py: Update _unwrap_experiment_data(), _unwrap_trial_data_multi(), and _unwrap_experiment_data_multi() to raise ExceptionGroup with all collected errors instead of chaining to a single exception. - ax/generation_strategy/generation_node.py: Update new_trial_limit() to collect all generation-blocking errors and raise as ExceptionGroup. Reviewed By: saitcakmak Differential Revision: D91648883
bfaa37b to
6d9e3f2
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4877 +/- ##
==========================================
- Coverage 96.75% 96.75% -0.01%
==========================================
Files 591 591
Lines 61874 61890 +16
==========================================
+ Hits 59869 59879 +10
- Misses 2005 2011 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This pull request has been merged in 8e4112f. |
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:
Convert error collection patterns to use Python 3.11 ExceptionGroup instead
of ad-hoc exception aggregation. This provides better structured exception
handling and enables the use of except* syntax in callers.
Files changed:
and _unwrap_experiment_data_multi() to raise ExceptionGroup with all collected
errors instead of chaining to a single exception.
all generation-blocking errors and raise as ExceptionGroup.
Reviewed By: saitcakmak
Differential Revision: D91648883