Closing MongoDB, IndexError: single positional indexer is out-of-bounds, PBT example
martsalz opened this issue · 2 comments
martsalz commented
When I run the mnistcnnpbt
example, the following error message appears:
(Always at trial 20)
INFO:sherpa.core:
-------------------------------------------------------
Submitting Trial 20:
dropout = 0.30687144848463904
load_from = 6
lr = 0.007697357252133577
save_to = 20
lineage = 6,
batch_size = 16
generation = 2
-------------------------------------------------------
Closing MongoDB!
Traceback (most recent call last):
File "runner.py", line 67, in <module>
output_dir='./output')
File "/home/martin/Desktop/sherpa/sherpa/core.py", line 640, in optimize
runner.run_loop()
File "/home/martin/Desktop/sherpa/sherpa/core.py", line 561, in run_loop
self.submit_new_trials()
File "/home/martin/Desktop/sherpa/sherpa/core.py", line 522, in submit_new_trials
next_trial = self.study.get_suggestion()
File "/home/martin/Desktop/sherpa/sherpa/core.py", line 200, in get_suggestion
self.lower_is_better)
File "/home/martin/Desktop/sherpa/sherpa/algorithms/core.py", line 576, in get_suggestion
lower_is_better=lower_is_better)
File "/home/martin/Desktop/sherpa/sherpa/algorithms/core.py", line 601, in _truncation_selection
d = generation_df.iloc[(self.count - 1) % self.population_size].to_dict()
File "/home/martin/Desktop/venv_sherpa/lib/python3.5/site-packages/pandas/core/indexing.py", line 1328, in __getitem__
return self._getitem_axis(key, axis=0)
File "/home/martin/Desktop/venv_sherpa/lib/python3.5/site-packages/pandas/core/indexing.py", line 1749, in _getitem_axis
self._is_valid_integer(key, axis)
File "/home/martin/Desktop/venv_sherpa/lib/python3.5/site-packages/pandas/core/indexing.py", line 1638, in _is_valid_integer
raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds
(venv_sherpa) martin@martin-notebook:~/Desktop/sherpa/examples/parallel-examples/mnistcnnpbt$
LarsHH commented
Working on it. Will have to get back to you.
LarsHH commented
@martsalz for now I think this (new) example is a better reference: https://github.com/sherpa-ai/sherpa/blob/master/examples/keras_mnist_mlp_population_based_training.ipynb . Also please update your Sherpa version before re-running since I have worked on the PBT implementation since.