lab
lab copied to clipboard
Environment crashes when playing back demo for recording
I setup Bazel and DeepMind Lab according to the build instructions in this repo. I am using Python 3.
I can run a random agent without any trouble, i.e. the following command works:
bazel run -c opt :python_random_agent -- --length=$LENGTH --width=$WIDTH --height=$HEIGHT --demofiles ./DEMOFILES --record .
INFO: Invocation ID: 3c887366-f394-41ab-a471-3974138f48d4
INFO: Analysed target //:python_random_agent (55 packages loaded, 3823 targets configured).
INFO: Found 1 target...
Target //:python_random_agent up-to-date:
bazel-bin/python_random_agent
INFO: Elapsed time: 21.373s, Critical Path: 10.36s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/python_random_agent '--length=100' '--widtINFO: Build completed successfully, 1 total action
Starting random spring agent. Action spec: [{'min': -512, 'max': 512, 'name': 'LOOK_LEFT_RIGHT_PIXELS_PER_FRAME'}, {'min': -512, 'max': 512, 'name': 'LOOK_DOWN_UP_PIXELS_PER_FRAME'}, {'min': -1, 'max': 1, 'name': 'STRAFE_LEFT_RIGHT'}, {'min': -1, 'max': 1, 'name': 'MOVE_BACK_FORWARD'}, {'min': 0, 'max': 1, 'name': 'FIRE'}, {'min': 0, 'max': 1, 'name': 'JUMP'}, {'min': 0, 'max': 1, 'name': 'CROUCH'}]
Finished after 100 steps. Total reward received is 0.000000
But when creating a video, the environment seems to crash.
bazel run -c opt :python_random_agent -- --length=$LENGTH --width=$WIDTH --height=$HEIGHT --demofiles ./DEMOFILES --demo . --video .
INFO: Invocation ID: d757700d-edbe-4113-957b-5d315fccec97
INFO: Analysed target //:python_random_agent (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //:python_random_agent up-to-date:
bazel-bin/python_random_agent
INFO: Elapsed time: 2.132s, Critical Path: 0.01s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/python_random_agent '--length=100' '--widtINFO: Build completed successfully, 1 total action
Starting random spring agent. Action spec: [{'min': -512, 'max': 512, 'name': 'LOOK_LEFT_RIGHT_PIXELS_PER_FRAME'}, {'min': -512, 'max': 512, 'name': 'LOOK_DOWN_UP_PIXELS_PER_FRAME'}, {'min': -1, 'max': 1, 'name': 'STRAFE_LEFT_RIGHT'}, {'min': -1, 'max': 1, 'name': 'MOVE_BACK_FORWARD'}, {'min': 0, 'max': 1, 'name': 'FIRE'}, {'min': 0, 'max': 1, 'name': 'JUMP'}, {'min': 0, 'max': 1, 'name': 'CROUCH'}]
Environment stopped early
Traceback (most recent call last):
File "_____/.cache/bazel/_bazel______/______/execroot/org_deepmind_lab/bazel-out/k8-opt/bin/python_random_agent.runfiles/org_deepmind_lab/python/random_agent.py", line 206, in <module>
args.record, args.demo, args.demofiles, args.video)
File "______/.cache/bazel/_bazel_________/_________/execroot/org_deepmind_lab/bazel-out/k8-opt/bin/python_random_agent.runfiles/org_deepmind_lab/python/random_agent.py", line 168, in run
env.reset()
RuntimeError: Failed to start environment - ""
ERROR: Moving video file failed: No such file or directory /tmp/dmlab_temp_folder_UDV3FS/baselab/videos/./00002.avi ./DEMOFILES/./videos/./00002.avi
How can I go about resolving this issue?
Thank you for your command that guides me to use the recording function. I met the same situation. Even though, I am able to find the .avi
file in DEMOFILES/video after a short-term waiting.
Another problem is that the video is upside down and left-right reversed. Quite disappointing.