-
Notifications
You must be signed in to change notification settings - Fork 311
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
Ax Trial
: Bug fix for error message that references nonexistent function
#2304
Conversation
This pull request was exported from Phabricator. Differential Revision: D55439108 |
…ction (facebook#2304) Summary: `BaseTrial._validate_can_attach_data` raises the following exception: f"Trial {self.index} has already been completed with data. To add more data to it (for example, for a different metric), use `Trial.update_trial_data()` or BatchTrial.update_batch_trial_data()." This is not right because there is no `BatchTrial.update_batch_trial_data`. Also, it's an anti-pattern for a superclass to reference its subclasses like this instead of delegating to them. This PR: - Makes the behavior in the base class make sense for clases that have no method like "update trial data" - Overrides that error message for `Trial` which does have such an update method Differential Revision: D55439108
72f135c
to
7532c6f
Compare
This pull request was exported from Phabricator. Differential Revision: D55439108 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2304 +/- ##
=======================================
Coverage 94.90% 94.91%
=======================================
Files 489 489
Lines 47690 47710 +20
=======================================
+ Hits 45262 45282 +20
Misses 2428 2428 ☔ View full report in Codecov by Sentry. |
…ction (facebook#2304) Summary: `BaseTrial._validate_can_attach_data` raises the following exception: f"Trial {self.index} has already been completed with data. To add more data to it (for example, for a different metric), use `Trial.update_trial_data()` or BatchTrial.update_batch_trial_data()." This is not right because there is no `BatchTrial.update_batch_trial_data`. Also, it's an anti-pattern for a superclass to reference its subclasses like this instead of delegating to them. This PR: - Makes the behavior in the base class make sense for clases that have no method like "update trial data" - Overrides that error message for `Trial` which does have such an update method Differential Revision: D55439108
7532c6f
to
2421578
Compare
This pull request was exported from Phabricator. Differential Revision: D55439108 |
…ction (facebook#2304) Summary: `BaseTrial._validate_can_attach_data` raises the following exception: f"Trial {self.index} has already been completed with data. To add more data to it (for example, for a different metric), use `Trial.update_trial_data()` or BatchTrial.update_batch_trial_data()." This is not right because there is no `BatchTrial.update_batch_trial_data`. Also, it's an anti-pattern for a superclass to reference its subclasses like this instead of delegating to them. This PR: - Makes the behavior in the base class make sense for clases that have no method like "update trial data" - Overrides that error message for `Trial` which does have such an update method Reviewed By: bernardbeckerman, mpolson64 Differential Revision: D55439108
2421578
to
c8aa2d6
Compare
This pull request was exported from Phabricator. Differential Revision: D55439108 |
This pull request has been merged in 86a4c8d. |
Summary:
BaseTrial._validate_can_attach_data
raises the following exception: f"Trial {self.index} has already been completed with data. To add more data to it (for example, for a different metric), useTrial.update_trial_data()
or BatchTrial.update_batch_trial_data()."This is not right because there is no
BatchTrial.update_batch_trial_data
. Also, it's an anti-pattern for a superclass to reference its subclasses like this instead of delegating to them.This PR:
Trial
which does have such an update methodDifferential Revision: D55439108