Closed shreyagu closed 4 years ago
Closing this after direct conversation with author of the issue.
Hello! I'm getting this very same error running simple.py. Any chance you can post what resolved the issue? Thanks!
Hi @ggantos! I just pulled from master and ran this and it worked. Do you mind doing the following:
1) pasting the output from running the script. Is it exactly as above? 2) check if there was a tmp* folder created in the folder where simple.py is. If yes, could you check if there is a results.csv and if it is non-empty? 3) can you check what pandas version you have?
Best, Lars
Hello! Thank you for the reply I was trying to fix things myself and figured out that I needed to conda deactivate base in my batch script after source ~/.bashrc. Then conda activate sherpa environment. Thanks for your reply and help!
@ggantos @LarsHH Can you explain this more, like what is different in your sherpa environment? I am facing the same issue; KeyError: 'Objective'. No data displayed on dashboard. Job output for trial 1:
Traceback (most recent call last):
File "./tmpmiwdolg5/test.py", line 5, in <module>
trial = client.get_trial()
File "/home/user/miniconda3/lib/python3.7/site-packages/sherpa/database.py", line 222, in get_trial
t = next(g)
File "/home/user/miniconda3/lib/python3.7/site-packages/sherpa/database.py", line 221, in <genexpr>
g = (entry for entry in self.db.trials.find({'trial_id': trial_id}))
File "/home/user/miniconda3/lib/python3.7/site-packages/pymongo/cursor.py", line 1207, in next
if len(self.__data) or self._refresh():
File "/home/user/miniconda3/lib/python3.7/site-packages/pymongo/cursor.py", line 1100, in _refresh
self.__session = self.__collection.database.client._ensure_session()
File "/home/vex/miniconda3/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1816, in _ensure_session
return self.__start_session(True, causal_consistency=False)
File "/home/user/miniconda3/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1766, in __start_session
server_session = self._get_server_session()
File "/home/user/miniconda3/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1802, in _get_server_session
return self._topology.get_server_session()
File "/home/user/miniconda3/lib/python3.7/site-packages/pymongo/topology.py", line 488, in get_server_session
None)
File "/home/user/miniconda3/lib/python3.7/site-packages/pymongo/topology.py", line 217, in _select_servers_loop
(self._error_message(selector), timeout, self.description))
pymongo.errors.ServerSelectionTimeoutError: hostname:27001: [Errno 111] Connection refused, Timeout: 30s, Topology Description: <TopologyDescription id: 5f3c4212cde0a5c7878ddbe9, topology_type: Single, servers: [<ServerDescription ('openmind7', 27001) server_type: Unknown, rtt: None, error=AutoReconnect('hostname:27001: [Errno 111] Connection refused')>]>
non-parallel simple.py works fine with the dashboard etc. I'm using mongo db version v4.0.3 because thats whats installed on the cluster I'm using.
Hi @bluevex - rather than build an environment from what I was using in my other repos, I installed via Sherpa's setup.py and only modified module versions to get other libraries in my workflow to function. I also deactivated conda's base environment before activating my sherpa environment. I'm honestly not sure about your error but these two changes worked for me. I hope that helps!
@bluevex I might for now recommend to clone from github and install sherpa using pip install -e .
from the cloned sherpa root dir. That's because pypi is one version behind the github version due to deployment issues.
Aim
I'm trying to implement sherpa for parallel bayesian optimization, but just trying to run the sherpa/examples/parallel_example/simple.py throws the following errors:
Code
Error Logs