stepjam / RLBench

A large-scale benchmark and learning environment.
https://sites.google.com/corp/view/rlbench
Other
1.11k stars 226 forks source link

Dataset Generator file not working #37

Closed sambhavaggarwal closed 4 years ago

sambhavaggarwal commented 4 years ago

Hi Stephen, first of all thank you so much for building this amazing tool. I am trying to use your dataset_generator.py file but I am getting this error

Traceback (most recent call last): File "/usr/lib/python3.5/multiprocessing/process.py", line 249, in _bootstrap self.run() File "/usr/lib/python3.5/multiprocessing/process.py", line 93, in run self._target(*self._args, **self._kwargs) File "dataset_generator.py", line 148, in run if my_variation_count >= task_env.variation_count(): AttributeError: 'TaskEnvironment' object has no attribute 'variation_count' Data collection done! Any guidance on this would be hugely appreciated! Thanks so much, Sambhav

nevakanezzar commented 4 years ago

Can confirm, but with a different error.

I ran: python3 dataset_generator.py --episodes_per_task 1 --processes 1

It errorred out with

Initialization successful.
Process 0 collecting task: take_money_out_safe // variation: 0
Process Process-2:
Traceback (most recent call last):
  File "venv/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "venv/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "dataset_generator.py", line 163, in run
    task_env = rlbench_env.get_task(t)
  File "/home/user/.local/lib/python3.7/site-packages/rlbench/environment.py", line 166, in get_task
    self._prev_task.unload()
  File "/home/user/.local/lib/python3.7/site-packages/rlbench/backend/task.py", line 283, in unload
    self.cleanup()
  File "/home/user/.local/lib/python3.7/site-packages/rlbench/tasks/take_money_out_safe.py", line 110, in cleanup
    for m in self.money_list:
AttributeError: 'TakeMoneyOutSafe' object has no attribute 'money_list'
Data collection done!

I suspect this is due to a version mismatch in multiprocessing, that for some reason _prev_task is being assigned a task before the actual instantiation of the task, triggering unload + cleanup of a task that hasn't even been initialised. Could this be the case? I'm using Python 3.7.6.

Please advise. Thanks a ton.

stepjam commented 4 years ago

Hi Both,

@sambhavaggarwal . Please make sure you have the latest version of RLBench installed. It looks like you might have just pulled the new dataset_generator without re-installing RLBench.

@nevakanezzar . Thanks for pointing out! Expect a fix very soon.

stepjam commented 4 years ago

@nevakanezzar . Please reopen if this does not resolve the issue.

nevakanezzar commented 4 years ago

Seems to be fixed! Thanks, this is great. I see some of the tasks failed to run, I'll post their error messages in a new issue.