aryandeshwal / BOPS

Python implementation of Bayesian optimization over permutation spaces.
14 stars 1 forks source link

TSP mallows not running properly #2

Closed toledo60 closed 1 year ago

toledo60 commented 1 year ago

Ive tried to run the TSP Mellows kernel example (tsp_mallow.py) and I keep receiving the following error I've tried running it locally and google Colab, different versions of gpytorch and botorch (both cpu only and gpu versions) but I keep receiving the same error every time (I haven't changed any of the code)

Im not sure what version of the packages you are using or if it even makes a difference

Screenshot 2023-01-23 at 9 55 21 AM

Could you do a pip freeze to see the package versions you used to properly run this file ? or any help is appreciated

aryandeshwal commented 1 year ago

Hi, thanks for your interest in the work. The code was run with following package versions: PyTorch - 1.9.0 GpyTorch - 1.6.0 BoTorch - 0.6.3.1

There has been new changes in later versions of GpyTorch and BoTorch which might cause some issues. However, your error looks like a dtype mismatch issue. Please try running once by converting both inputs and train_y to a common dtype before line 115. One way to do this is to add these two statements right after line 114:

inputs = inputs.to(torch.double)
train_y = train_y.to(torch.double)

Please let me know if it works.

toledo60 commented 1 year ago

Thank you, got it to work without changing anything. You don't need lines

inputs = inputs.to(torch.double)
train_y = train_y.to(torch.double)

It all just depends on the version of packages you are using, I'll later try to clean it up for newer versions.