Skip to content
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

Fix pre-trained model URL in PFNs4BO sampler #87

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package/samplers/pfns4bo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ The benchmark consists of 70 problems. The 8 problems are from HPO tabular bench

## Others

The default prior argument is ``"hebo"``. This trains the PFNs model in the init of the sampler. If you want to use a pre-trained model, you can download the model checkpoint from the following link: https://github.com/automl/PFNs/blob/main/models_diff/prior_diff_real_checkpoint_n_0_epoch_42.cpkt and load it using the following code:
The default prior argument is ``"hebo"``. This trains the PFNs model in the init of the sampler. If you want to use a pre-trained model, you can download the model checkpoint from the following link: https://github.com/automl/PFNs4BO/tree/main/pfns4bo/final_models and load it using the following code:

```python
import torch

model = torch.load("PATH/TO/prior_diff_real_checkpoint_n_0_epoch_42.cpkt")
model = torch.load("PATH/TO/MODEL.pt")
sampler = PFNs4BOSampler(prior=model)
```

Expand Down
4 changes: 2 additions & 2 deletions package/samplers/pfns4bo/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ class PFNs4BOSampler(BaseSampler):
The default prior argument is ``"hebo"``. This trains the PFNs model in the
init of the sampler. If you want to use a pre-trained model, you can download
the model checkpoint from the following link:
https://github.com/automl/PFNs/blob/main/models_diff/prior_diff_real_checkpoint_n_0_epoch_42.cpkt
https://github.com/automl/PFNs4BO/tree/main/pfns4bo/final_models
and load it using the following code:

.. code-block:: python
import torch

model = torch.load("PATH/TO/prior_diff_real_checkpoint_n_0_epoch_42.cpkt")
model = torch.load("PATH/TO/MODEL.pt")
sampler = PFNs4BOSampler(prior=model)

.. note::
Expand Down