Closed xiaobaishu0097 closed 1 year ago
Hi @xiaobaishu0097, this error looks like the task is attempting to use an incorrect (i.e. more recent) AI2-THOR build during testing. Can you confirm that you're using the latest version of AllenAct (commit == 24907f16cd6aace1abb2fef90c8e8667859c38b8
) and that no changes have been made to the repository before running the above command? Note that the command actually shouldn't be able to run as that the file path
projects/objectnav_baselines/experiments/robothor/objectnav_robothor_rgbd_resnetgru_ddppo.py
has changed to
projects/objectnav_baselines/experiments/robothor/objectnav_robothor_rgbd_resnet18gru_ddppo.py
Hello @Lucaweihs, Thanks for your quick reply and kind reminders. I have noticed the missing project file and corrected the command to the right file.
For the error, I have updated the latest version of Allenact, and the same error is raised again. The error might be caused by AI2-THOR platform instead of Allenact. I am trying to run an evaluation on RoboTHOR testing scenes (e.g., FloorPlan_test-challenge1_1). However, those scenes are not accessible in any version of AI2-THOR according to the error message.
I am just curious whether AI2-THOR no longer supports those scenes.
Hi @xiaobaishu0097,
The testing scenes are not included in all AI2-THOR builds, thankfully you can access old THOR builds very easily by specifying the commit_id
parameter in the ai2thor.controller.Controller
constructor. For instance, can you try running
from ai2thor.controller import Controller
c = Controller(commit_id="bad5bc2b250615cb766ffb45d455c211329af17e")
c.reset("FloorPlan_test-challenge1_1")
print(c.last_event.metadata["sceneName"]) # Prints the current scene name
And confirm that no error occurs and that the scene was successfully set to be "FloorPlan_test-challenge1_1"
?
If the above works, I'm a bit confused as to why you're getting the error in AllenAct as we explicitly set the THOR build commit_id
to be the above commit_id
(see this line).
Thanks for your quick reply. I have found the problem with this commit.
Since I am using headless servers, which cannot run startx.py successfully, I choose to run the Allenact in headless mode. However, when the Allenact is running in headless mode, the commit_id will be changed to ai2thor.build.COMMIT_ID (see here), which is f0825767cd50d69f666c7f282e54abfe58f1e917
.
Meanwhile, may I ask why AI2-THOR did not include those testing scenes in the latest versions?
To try to solve the issue, I'm trying to install the Allenact in a docker container. Meanwhile, since the ai2thor-docker cannot be installed correctly, I aim to use Nvidia Pytorch Docker Image instead, i,e., nvcr.io/nvidia/pytorch:22.12-py3. I've followed these steps:
docker run -it -d --name="allenact" --gpus 'all' --env DISPLAY:$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw --pid=host --ipc=host --network=host --privileged=True -v /path/to/.ssh:/root/.ssh nvcr.io/nvidia/pytorch:22.12-py3
docker exec -it allenact bash
Then, I try to run the script python ./scripts/startx.py
in allenact directory. Since I run the docker as root, I did not use sudo in running the python file. However, I get the following error message:
Traceback (most recent call last):
File "./scripts/startx.py", line 101, in <module>
startx()
File "./scripts/startx.py", line 73, in startx
for r in pci_records():
File "./scripts/startx.py", line 17, in pci_records
output = subprocess.check_output(command).decode()
File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 493, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'lspci'
Following the suggestion in another issue, I install the pciutils
by apt install pciutils
and re-run the python ./scripts/startx.py
. Then, the docker raises a new error message:
Traceback (most recent call last):
File "./scripts/startx.py", line 101, in <module>
startx()
File "./scripts/startx.py", line 89, in startx
proc = subprocess.Popen(command)
File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'Xorg'
Unfortunately, an error after executing 'python ./scripts/startx.py' while attempting to install 'xserver-xorg' using 'DEBIAN_FRONTEND=noninteractive apt install xserver-xorg', following the suggestion in another issue.
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE)
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
Could you please help me on this matter? Thanks for your time!
I have managed to start X services on the headless machine without docker at final. I think that might be the best solution for now.
Hi @xiaobaishu0097 ,
Sorry for the delay! I'm happy to hear you managed to make things work by starting the X-display.
Meanwhile, may I ask why AI2-THOR did not include those testing scenes in the latest versions?
Two reasons:
Thanks for your kind reply!
Problem
I am unable to access the testing scenes in RoboTHOR. When I try to open a testing scene following the ObjectNav Baseline, the program crashes and I receive an error message.
Steps to reproduce
Steps to reproduce the behavior:
export SAVED_MODEL_PATH=pretrained_model_ckpts/robothor-objectnav-challenge-2021/Objectnav-RoboTHOR-RGBD-ResNetGRU-DDPPO/2021-02-09_22-35-15/exp_Objectnav-RoboTHOR-RGBD-ResNetGRU-DDPPO_0.2.0a_300M__stage_00__steps_000170207237.pt python main.py projects/objectnav_baselines/experiments/robothor/objectnav_robothor_rgbd_resnetgru_ddppo.py -c $SAVED_MODEL_PATH --eval
Expected behavior
Evaluation on the testing scenes in RoboTHOR.
Error Message
Desktop
Please add the following information:
Additional context
Add any other context about the problem here.