Skip to content

Adding support for load_state_dict with assign=True for priors of Transformed distributions#2691

Merged
Balandat merged 4 commits into
cornellius-gp:mainfrom
hvarfner:state_dict_assign
Feb 19, 2026
Merged

Adding support for load_state_dict with assign=True for priors of Transformed distributions#2691
Balandat merged 4 commits into
cornellius-gp:mainfrom
hvarfner:state_dict_assign

Conversation

@hvarfner

Copy link
Copy Markdown
Contributor

Required changes in GPytorch to unblock meta-pytorch/botorch#3080. When load_state_dict is called with assign=True, setattr is called on _transformed attributes of the prior at the pytorch level.

This was not the intended use of the _transformed attribute, but it seems like we have to enable its modification directly.

@hvarfner

Copy link
Copy Markdown
Contributor Author

@Balandat

@hvarfner

Copy link
Copy Markdown
Contributor Author

@SebastianAment

Comment thread gpytorch/priors/prior.py Outdated
Comment thread gpytorch/priors/prior.py
Comment thread gpytorch/priors/utils.py Outdated
Comment thread gpytorch/priors/prior.py Outdated
Comment thread gpytorch/priors/prior.py
Comment thread gpytorch/priors/utils.py
@hvarfner
hvarfner force-pushed the state_dict_assign branch 2 times, most recently from 2ff825a to e35b828 Compare February 12, 2026 21:23
@Balandat
Balandat enabled auto-merge February 19, 2026 00:31
@Balandat
Balandat merged commit 685286d into cornellius-gp:main Feb 19, 2026
7 checks passed
hvarfner pushed a commit to hvarfner/botorch that referenced this pull request Feb 19, 2026
Summary:
One-line change to state_dict reating in notebook, 
from `"_transformed_loc"` to  f"{`BUFFERED_PREFIX}loc`"
in the tutorial to accomodate upstream gpytorch change: cornellius-gp/gpytorch#2691

Reviewed By: Balandat

Differential Revision: D93032203
hvarfner pushed a commit to hvarfner/botorch that referenced this pull request Feb 19, 2026
Summary:

One-line change to state_dict reating in notebook, 
from `"_transformed_loc"` to  f"{`BUFFERED_PREFIX}loc`"
in the tutorial to accomodate upstream gpytorch change: cornellius-gp/gpytorch#2691

Reviewed By: Balandat

Differential Revision: D93032203
hvarfner pushed a commit to hvarfner/botorch that referenced this pull request Feb 19, 2026
Summary:

One-line change to state_dict reating in notebook, 
from `"_transformed_loc"` to  f"{`BUFFERED_PREFIX}loc`"
in the tutorial to accomodate upstream gpytorch change: cornellius-gp/gpytorch#2691

Reviewed By: Balandat

Differential Revision: D93032203
hvarfner pushed a commit to hvarfner/botorch that referenced this pull request Feb 19, 2026
Summary:

One-line change to state_dict reating in notebook, 
from `"_transformed_loc"` to  f"{`BUFFERED_PREFIX}loc`"
in the tutorial to accomodate upstream gpytorch change: cornellius-gp/gpytorch#2691

Reviewed By: Balandat

Differential Revision: D93032203
hvarfner pushed a commit to hvarfner/botorch that referenced this pull request Feb 19, 2026
Summary:

One-line change to state_dict reating in notebook, 
from `"_transformed_loc"` to  f"{`BUFFERED_PREFIX}loc`"
in the tutorial to accomodate upstream gpytorch change: cornellius-gp/gpytorch#2691

Reviewed By: Balandat

Differential Revision: D93032203
hvarfner pushed a commit to hvarfner/botorch that referenced this pull request Feb 19, 2026
Summary:

One-line change to state_dict reating in notebook, 
from `"_transformed_loc"` to  f"{`BUFFERED_PREFIX}loc`"
in the tutorial to accomodate upstream gpytorch change: cornellius-gp/gpytorch#2691

Reviewed By: Balandat

Differential Revision: D93032203
meta-codesync Bot pushed a commit to meta-pytorch/botorch that referenced this pull request Feb 20, 2026
Summary:
Pull Request resolved: #3188

One-line change to state_dict reating in notebook,
from `"_transformed_loc"` to  f"{`BUFFERED_PREFIX}loc`"
in the tutorial to accomodate upstream gpytorch change: cornellius-gp/gpytorch#2691

Reviewed By: Balandat

Differential Revision: D93032203

fbshipit-source-id: 5577c5200aea32e82355361fb3de08fe7ef6eced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants