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

Example in Readme throwing an error #201

Closed
ilario opened this issue Sep 8, 2022 · 2 comments
Closed

Example in Readme throwing an error #201

ilario opened this issue Sep 8, 2022 · 2 comments

Comments

@ilario
Copy link
Contributor

ilario commented Sep 8, 2022

  • Operating System: Arch Linux
  • Python version: 3.10.6
  • summit version used: 0.8.7

Description

I installed the latest version of Summit and run the example listing taken from the Readme file.
I got the error message reported below.
It is not clear at all which threshold I should increase.

What I Did

´´´
$ python -m venv .venv
$ ~ source .venv/bin/activate
$ ~ pip install -U summit
python
Python 3.10.6 (main, Aug 3 2022, 17:39:45) [GCC 12.1.1 20220730] on linux
Type "help", "copyright", "credits" or "license" for more information.

from summit.benchmarks import SnarBenchmark
from summit.strategies import NelderMead, MultitoSingleObjective
from summit.run import Runner

exp = SnarBenchmark()

transform = MultitoSingleObjective(
... exp.domain, expression="-sty/1e4+e_factor/100", maximize=False
... )

nm = NelderMead(exp.domain, transform=transform)

r = Runner(
... strategy=nm, experiment=exp,max_iterations=50
... )
r.run()

/home/ilario/.venv/lib/python3.10/site-packages/summit/strategies/neldermead.py:195: FutureWarning: In a future version of pandas all arguments of DataFrame.drop except for the argument 'labels' will be keyword-only.
next_experiments = next_experiments.drop(("constraint", "DATA"), 1)
/home/ilario/.venv/lib/python3.10/site-packages/summit/experiment.py:92: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
self._data = self._data.append(res)
/home/ilario/.venv/lib/python3.10/site-packages/summit/strategies/neldermead.py:146: FutureWarning: In a future version of pandas all arguments of DataFrame.drop except for the argument 'labels' will be keyword-only.
invalid_res = self.prev_param[1].drop(("constraint", "DATA"), 1)
[... many many more FutureWarning messages ...]

Traceback (most recent call last):
File "", line 1, in
File "/home/ilario/.venv/lib/python3.10/site-packages/summit/run.py", line 164, in run
next_experiments = self.strategy.suggest_experiments(
File "/home/ilario/.venv/lib/python3.10/site-packages/summit/strategies/neldermead.py", line 159, in suggest_experiments
next_experiments, xbest, fbest, param = self._inner_suggest_experiments(
File "/home/ilario/.venv/lib/python3.10/site-packages/summit/strategies/neldermead.py", line 457, in _inner_suggest_experiments
overfull_simplex, _, _, _, _, _ = self.check_overfull(
File "/home/ilario/.venv/lib/python3.10/site-packages/summit/strategies/neldermead.py", line 910, in check_overfull
raise ValueError(
ValueError: Simplex is overfull in one dimension. Please increase threshold for stopping.
´´´

@ilario
Copy link
Contributor Author

ilario commented Oct 10, 2022

Thanks for the new example in #202!
Now the code runs, but the plotting complains about this:

>>> r.experiment.pareto_plot(ax=ax)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'ax' is not defined. Did you mean: 'max'?

@ilario
Copy link
Contributor Author

ilario commented Dec 6, 2022

I suppose this has been fixed in e0b0111 (but I did not check), closing.

@ilario ilario closed this as completed Dec 6, 2022
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

1 participant