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

FileExistsError while starting multiple experiments at the same time #811

Closed
irenezhang30 opened this issue Mar 18, 2021 · 4 comments
Closed

Comments

@irenezhang30
Copy link

File "/usr/local/lib/python3.5/dist-packages/sacred-0.7.2-py3.5.egg/sacred/observers/file_storage.py", line 109, in started_event
os.mkdir(self.dir)
FileExistsError: [Errno 17] File exists: '/home/pymarl2/smac_exp_results/sacred/505'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/pymarl2/src/main.py", line 107, in
ex.run_commandline(params)
File "/usr/local/lib/python3.5/dist-packages/sacred-0.7.2-py3.5.egg/sacred/experiment.py", line 250, in run_commandline
return self.run(cmd_name, config_updates, named_configs, {}, args)
File "/usr/local/lib/python3.5/dist-packages/sacred-0.7.2-py3.5.egg/sacred/experiment.py", line 199, in run
run()
File "/usr/local/lib/python3.5/dist-packages/sacred-0.7.2-py3.5.egg/sacred/run.py", line 247, in call
self._stop_heartbeat()
File "/usr/local/lib/python3.5/dist-packages/sacred-0.7.2-py3.5.egg/sacred/run.py", line 282, in _stop_heartbeat
self._emit_heartbeat() # one final beat to flush pending changes
File "/usr/local/lib/python3.5/dist-packages/sacred-0.7.2-py3.5.egg/sacred/run.py", line 352, in _emit_heartbeat
result=self.result)
File "/usr/local/lib/python3.5/dist-packages/sacred-0.7.2-py3.5.egg/sacred/run.py", line 399, in _safe_call
getattr(obs, method)(**kwargs)
File "/usr/local/lib/python3.5/dist-packages/sacred-0.7.2-py3.5.egg/sacred/observers/file_storage.py", line 172, in heartbeat_event
self.run_entry['heartbeat'] = beat_time.isoformat()
TypeError: 'NoneType' object does not support item assignment

@thequilo
Copy link
Collaborator

Do you only use the FileStorageObserver or do you use any other observers at the same time?

@irenezhang30
Copy link
Author

irenezhang30 commented Mar 18, 2021

Do you only use the FileStorageObserver or do you use any other observers at the same time?

I only use the FileStorageObserver, for code see here: https://github.com/oxwhirl/pymarl/blob/73960e11c5a72e7f9c492d36dbfde02016fde05a/src/main.py#L96

@thequilo
Copy link
Collaborator

I just saw that you use sacred Version 0.7.2. This issue got fixed in #473. The fix is in the current version on PyPi.

@irenezhang30
Copy link
Author

Got it working now, Thank you!

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