Fix prior deserialization for priors with buffered attributes (#5167)#5167
Closed
hvarfner wants to merge 1 commit intofacebook:mainfrom
Closed
Fix prior deserialization for priors with buffered attributes (#5167)#5167hvarfner wants to merge 1 commit intofacebook:mainfrom
hvarfner wants to merge 1 commit intofacebook:mainfrom
Conversation
|
@hvarfner has exported this pull request. If you are a Meta employee, you can view the originating Diff in D100341242. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5167 +/- ##
=======================================
Coverage 96.42% 96.42%
=======================================
Files 619 619
Lines 69308 69318 +10
=======================================
+ Hits 66829 66839 +10
Misses 2479 2479 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4a7a898 to
84a9d69
Compare
hvarfner
pushed a commit
to hvarfner/Ax
that referenced
this pull request
Apr 21, 2026
…ok#5167) Summary: The Ax JSON decoder's `botorch_component_from_json` strips the `BUFFERED_PREFIX` from state_dict keys only for `TransformedDistribution` subclasses. This misses priors like `BetaPrior` whose underlying distribution (`Beta`) uses `property` descriptors delegating to an internal `Dirichlet`, causing `_bufferize_attributes` to use the prefix. Broaden the check from `TransformedDistribution` to `(TransformedDistribution, Prior)` so all gpytorch priors with buffered attributes deserialize correctly. Differential Revision: D100341242
84a9d69 to
0765601
Compare
hvarfner
pushed a commit
to hvarfner/Ax
that referenced
this pull request
Apr 21, 2026
…ok#5167) Summary: Pull Request resolved: facebook#5167 The Ax JSON decoder's `botorch_component_from_json` strips the `BUFFERED_PREFIX` from state_dict keys only for `TransformedDistribution` subclasses. This misses priors like `BetaPrior` whose underlying distribution (`Beta`) uses `property` descriptors delegating to an internal `Dirichlet`, causing `_bufferize_attributes` to use the prefix. Broaden the check from `TransformedDistribution` to `(TransformedDistribution, Prior)` so all gpytorch priors with buffered attributes deserialize correctly. Differential Revision: D100341242
0765601 to
813551c
Compare
hvarfner
pushed a commit
to hvarfner/Ax
that referenced
this pull request
Apr 21, 2026
…ok#5167) Summary: The Ax JSON decoder's `botorch_component_from_json` strips the `BUFFERED_PREFIX` from state_dict keys only for `TransformedDistribution` subclasses. This misses priors like `BetaPrior` whose underlying distribution (`Beta`) uses `property` descriptors delegating to an internal `Dirichlet`, causing `_bufferize_attributes` to use the prefix. Broaden the check from `TransformedDistribution` to `(TransformedDistribution, Prior)` so all gpytorch priors with buffered attributes deserialize correctly. Reviewed By: sdaulton Differential Revision: D100341242
hvarfner
pushed a commit
to hvarfner/Ax
that referenced
this pull request
Apr 21, 2026
…ok#5167) Summary: Pull Request resolved: facebook#5167 The Ax JSON decoder's `botorch_component_from_json` strips the `BUFFERED_PREFIX` from state_dict keys only for `TransformedDistribution` subclasses. This misses priors like `BetaPrior` whose underlying distribution (`Beta`) uses `property` descriptors delegating to an internal `Dirichlet`, causing `_bufferize_attributes` to use the prefix. Broaden the check from `TransformedDistribution` to `(TransformedDistribution, Prior)` so all gpytorch priors with buffered attributes deserialize correctly. Differential Revision: D100341242
hvarfner
pushed a commit
to hvarfner/Ax
that referenced
this pull request
Apr 21, 2026
…ok#5167) Summary: The Ax JSON decoder's `botorch_component_from_json` strips the `BUFFERED_PREFIX` from state_dict keys only for `TransformedDistribution` subclasses. This misses priors like `BetaPrior` whose underlying distribution (`Beta`) uses `property` descriptors delegating to an internal `Dirichlet`, causing `_bufferize_attributes` to use the prefix. Broaden the check from `TransformedDistribution` to `(TransformedDistribution, Prior)` so all gpytorch priors with buffered attributes deserialize correctly. Reviewed By: sdaulton Differential Revision: D100341242
813551c to
a1f5b5d
Compare
hvarfner
pushed a commit
to hvarfner/Ax
that referenced
this pull request
Apr 21, 2026
…ok#5167) Summary: Pull Request resolved: facebook#5167 The Ax JSON decoder's `botorch_component_from_json` strips the `BUFFERED_PREFIX` from state_dict keys only for `TransformedDistribution` subclasses. This misses priors like `BetaPrior` whose underlying distribution (`Beta`) uses `property` descriptors delegating to an internal `Dirichlet`, causing `_bufferize_attributes` to use the prefix. Broaden the check from `TransformedDistribution` to `(TransformedDistribution, Prior)` so all gpytorch priors with buffered attributes deserialize correctly. Reviewed By: sdaulton Differential Revision: D100341242
a1f5b5d to
3dd0b43
Compare
hvarfner
pushed a commit
to hvarfner/Ax
that referenced
this pull request
Apr 21, 2026
…ok#5167) Summary: The Ax JSON decoder's `botorch_component_from_json` strips the `BUFFERED_PREFIX` from state_dict keys only for `TransformedDistribution` subclasses. This misses priors like `BetaPrior` whose underlying distribution (`Beta`) uses `property` descriptors delegating to an internal `Dirichlet`, causing `_bufferize_attributes` to use the prefix. Broaden the check from `TransformedDistribution` to `(TransformedDistribution, Prior)` so all gpytorch priors with buffered attributes deserialize correctly. Reviewed By: sdaulton Differential Revision: D100341242
hvarfner
pushed a commit
to hvarfner/Ax
that referenced
this pull request
Apr 21, 2026
…ok#5167) Summary: Pull Request resolved: facebook#5167 The Ax JSON decoder's `botorch_component_from_json` strips the `BUFFERED_PREFIX` from state_dict keys only for `TransformedDistribution` subclasses. This misses priors like `BetaPrior` whose underlying distribution (`Beta`) uses `property` descriptors delegating to an internal `Dirichlet`, causing `_bufferize_attributes` to use the prefix. Broaden the check from `TransformedDistribution` to `(TransformedDistribution, Prior)` so all gpytorch priors with buffered attributes deserialize correctly. Differential Revision: D100341242
hvarfner
pushed a commit
to hvarfner/Ax
that referenced
this pull request
Apr 21, 2026
…ok#5167) Summary: The Ax JSON decoder's `botorch_component_from_json` strips the `BUFFERED_PREFIX` from state_dict keys only for `TransformedDistribution` subclasses. This misses priors like `BetaPrior` whose underlying distribution (`Beta`) uses `property` descriptors delegating to an internal `Dirichlet`, causing `_bufferize_attributes` to use the prefix. Broaden the check from `TransformedDistribution` to `(TransformedDistribution, Prior)` so all gpytorch priors with buffered attributes deserialize correctly. Reviewed By: sdaulton Differential Revision: D100341242
3dd0b43 to
cc15802
Compare
hvarfner
pushed a commit
to hvarfner/Ax
that referenced
this pull request
Apr 21, 2026
…ok#5167) Summary: The Ax JSON decoder's `botorch_component_from_json` strips the `BUFFERED_PREFIX` from state_dict keys only for `TransformedDistribution` subclasses. This misses priors like `BetaPrior` whose underlying distribution (`Beta`) uses `property` descriptors delegating to an internal `Dirichlet`, causing `_bufferize_attributes` to use the prefix. Broaden the check from `TransformedDistribution` to `(TransformedDistribution, Prior)` so all gpytorch priors with buffered attributes deserialize correctly. Reviewed By: sdaulton Differential Revision: D100341242
hvarfner
pushed a commit
to hvarfner/Ax
that referenced
this pull request
Apr 21, 2026
…ok#5167) Summary: The Ax JSON decoder's `botorch_component_from_json` strips the `BUFFERED_PREFIX` from state_dict keys only for `TransformedDistribution` subclasses. This misses priors like `BetaPrior` whose underlying distribution (`Beta`) uses `property` descriptors delegating to an internal `Dirichlet`, causing `_bufferize_attributes` to use the prefix. Broaden the check from `TransformedDistribution` to `(TransformedDistribution, Prior)` so all gpytorch priors with buffered attributes deserialize correctly. Reviewed By: sdaulton Differential Revision: D100341242
hvarfner
pushed a commit
to hvarfner/Ax
that referenced
this pull request
Apr 21, 2026
…ok#5167) Summary: The Ax JSON decoder's `botorch_component_from_json` strips the `BUFFERED_PREFIX` from state_dict keys only for `TransformedDistribution` subclasses. This misses priors like `BetaPrior` whose underlying distribution (`Beta`) uses `property` descriptors delegating to an internal `Dirichlet`, causing `_bufferize_attributes` to use the prefix. Broaden the check from `TransformedDistribution` to `(TransformedDistribution, Prior)` so all gpytorch priors with buffered attributes deserialize correctly. Reviewed By: sdaulton Differential Revision: D100341242
hvarfner
pushed a commit
to hvarfner/Ax
that referenced
this pull request
Apr 21, 2026
…ok#5167) Summary: Pull Request resolved: facebook#5167 The Ax JSON decoder's `botorch_component_from_json` strips the `BUFFERED_PREFIX` from state_dict keys only for `TransformedDistribution` subclasses. This misses priors like `BetaPrior` whose underlying distribution (`Beta`) uses `property` descriptors delegating to an internal `Dirichlet`, causing `_bufferize_attributes` to use the prefix. Broaden the check from `TransformedDistribution` to `(TransformedDistribution, Prior)` so all gpytorch priors with buffered attributes deserialize correctly. Differential Revision: D100341242 Reviewed By: sdaulton
hvarfner
pushed a commit
to hvarfner/Ax
that referenced
this pull request
Apr 22, 2026
…ok#5167) Summary: The Ax JSON decoder's `botorch_component_from_json` strips the `BUFFERED_PREFIX` from state_dict keys only for `TransformedDistribution` subclasses. This misses priors like `BetaPrior` whose underlying distribution (`Beta`) uses `property` descriptors delegating to an internal `Dirichlet`, causing `_bufferize_attributes` to use the prefix. Broaden the check from `TransformedDistribution` to `(TransformedDistribution, Prior)` so all gpytorch priors with buffered attributes deserialize correctly. Reviewed By: sdaulton Differential Revision: D100341242
cc15802 to
235eeb9
Compare
…ok#5167) Summary: Pull Request resolved: facebook#5167 The Ax JSON decoder's `botorch_component_from_json` strips the `BUFFERED_PREFIX` from state_dict keys only for `TransformedDistribution` subclasses. This misses priors like `BetaPrior` whose underlying distribution (`Beta`) uses `property` descriptors delegating to an internal `Dirichlet`, causing `_bufferize_attributes` to use the prefix. Broaden the check from `TransformedDistribution` to `(TransformedDistribution, Prior)` so all gpytorch priors with buffered attributes deserialize correctly. Reviewed By: sdaulton Differential Revision: D100341242
235eeb9 to
cf271ba
Compare
|
This pull request has been merged in 63346cc. |
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:
The Ax JSON decoder's
botorch_component_from_jsonstrips theBUFFERED_PREFIXfrom state_dict keys only forTransformedDistributionsubclasses. This misses priors like
BetaPriorwhose underlyingdistribution (
Beta) usespropertydescriptors delegating to aninternal
Dirichlet, causing_bufferize_attributesto use the prefix.Broaden the check from
TransformedDistributionto(TransformedDistribution, Prior)so all gpytorch priors with bufferedattributes deserialize correctly.
Reviewed By: sdaulton
Differential Revision: D100341242