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

Get Started code gives the same result regardless of random seed #2260

Closed
Dj-Polyester opened this issue Mar 11, 2024 · 3 comments
Closed

Get Started code gives the same result regardless of random seed #2260

Dj-Polyester opened this issue Mar 11, 2024 · 3 comments
Assignees

Comments

@Dj-Polyester
Copy link

I run the code as shown here. Even though I tried different seed values, best_parameters is always {'x1': -10.0, 'x2': -10.0}.
I am using Python 3.11.7 on linux. pip list gives

aiosignal                 1.3.1
asttokens                 2.4.1
attrs                     23.2.0
ax-platform               0.3.7
bayesian-optimization     1.4.3
botorch                   0.10.0
certifi                   2024.2.2
charset-normalizer        3.3.2
click                     8.1.7
colorama                  0.4.6
comm                      0.2.1
contourpy                 1.2.0
cuda-python               12.3.0
cycler                    0.12.1
debugpy                   1.8.0
decorator                 5.1.1
executing                 2.0.1
filelock                  3.13.1
fonttools                 4.47.2
frozenlist                1.4.1
fsspec                    2023.12.2
gpytorch                  1.11
idna                      3.6
ipykernel                 6.29.0
ipython                   8.21.0
ipywidgets                8.1.1
jaxtyping                 0.2.28
jedi                      0.19.1
Jinja2                    3.1.3
joblib                    1.3.2
jsonschema                4.21.1
jsonschema-specifications 2023.12.1
jupyter_client            8.6.0
jupyter_core              5.7.1
jupyterlab-widgets        3.0.9
kiwisolver                1.4.5
lightning-utilities       0.10.1
linear-operator           0.5.1
MarkupSafe                2.1.5
matplotlib                3.8.2
matplotlib-inline         0.1.6
mpmath                    1.3.0
msgpack                   1.0.7
multipledispatch          1.0.0
mypy-extensions           1.0.0
nest-asyncio              1.6.0
networkx                  3.2.1
numpy                     1.26.3
nvidia-cublas-cu12        12.1.3.1
nvidia-cuda-cupti-cu12    12.1.105
nvidia-cuda-nvrtc-cu12    12.1.105
nvidia-cuda-runtime-cu12  12.1.105
nvidia-cudnn-cu12         8.9.2.26
nvidia-cufft-cu12         11.0.2.54
nvidia-curand-cu12        10.3.2.106
nvidia-cusolver-cu12      11.4.5.107
nvidia-cusparse-cu12      12.1.0.106
nvidia-nccl-cu12          2.19.3
nvidia-nvjitlink-cu12     12.3.101
nvidia-nvtx-cu12          12.1.105
opt-einsum                3.3.0
packaging                 23.2
pandas                    2.2.0
parso                     0.8.3
pexpect                   4.9.0
pillow                    10.2.0
pip                       24.0
pipdeptree                2.13.2
platformdirs              4.2.0
plotly                    5.19.0
prompt-toolkit            3.0.43
protobuf                  4.25.2
psutil                    5.9.8
ptyprocess                0.7.0
pure-eval                 0.2.2
pyaml                     23.12.0
pyarrow                   15.0.0
Pygments                  2.17.2
pyparsing                 3.1.1
pyre-extensions           0.0.30
pyro-api                  0.1.2
pyro-ppl                  1.9.0
python-dateutil           2.8.2
pytz                      2024.1
PyYAML                    6.0.1
pyzmq                     25.1.2
referencing               0.33.0
requests                  2.31.0
rpds-py                   0.17.1
scikit-learn              1.4.0
scikit-optimize           0.9.0
scipy                     1.12.0
setuptools                65.5.0
six                       1.16.0
stack-data                0.6.3
sympy                     1.12
tenacity                  8.2.3
tensorboardX              2.6.2.2
threadpoolctl             3.2.0
torch                     2.2.0
torchmetrics              1.3.0.post0
torchvision               0.17.0
tornado                   6.4
tqdm                      4.66.2
traitlets                 5.14.1
triton                    2.2.0
typeguard                 2.13.3
typing_extensions         4.9.0
typing-inspect            0.9.0
tzdata                    2023.4
urllib3                   2.2.0
wcwidth                   0.2.13
widgetsnbextension        4.0.9
@Cesar-Cardoso
Copy link
Contributor

Hello there! {'x1': -10.0, 'x2': -10.0} is the maximum in the search space. Is it possible that you're using minimize=False (or omitting minimize=True since False is the default)? When I run the example code I get {'x1': 1.0707105062836604, 'x2': 3.0290502263874703}.

@Cesar-Cardoso Cesar-Cardoso self-assigned this Mar 12, 2024
@Dj-Polyester
Copy link
Author

Sorry for the late reply. I have given up hope when no reply from you arrived, then started investigating the code myself. In 0.3.7 when objective_name=None (as given in the Get Started code), regardless of the value of minimize, _get_default_objectives in instantiation.py returns "maximize", hence the optimize function always maximizes. Is this an expected behaviou or a PR needed? I can PR if you want.

@Dj-Polyester
Copy link
Author

I realized that the issue is already resolved in #2251; however, stable version is not available in PyPI fyi.

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

No branches or pull requests

2 participants