askforalfred / alfred

ALFRED - A Benchmark for Interpreting Grounded Instructions for Everyday Tasks
MIT License
360 stars 77 forks source link

Evaluating on Local Machine (no docker) #64

Closed Axe-- closed 3 years ago

Axe-- commented 3 years ago

Hey, I am trying to evalutate a baseline model, using the eval_seq2seq.py script.

However, having issues with the X Server display.

Command (py3ve) axe@axe-H270-Gaming-3:~/Projects/ALFRED$ python models/eval/eval_seq2seq.py --data data/json_feat_2.1.0/ --model models.model.seq2seq_im_mask --model_path best_seen.pth --eval_split valid_seen --gpu

Log {'tests_seen': 1533, 'tests_unseen': 1529, 'train': 21023, 'valid_seen': 820, 'valid_unseen': 821} Loading: best_seen.pth Invalid MIT-MAGIC-COOKIE-1 keyxdpyinfo: unable to open display ":0". Process Process-2: Traceback (most recent call last): File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run self._target(*self._args, **self._kwargs) File "/home/axe/Projects/ALFRED/models/eval/eval_task.py", line 21, in run env = ThorEnv() File "/home/axe/Projects/ALFRED/env/thor_env.py", line 33, in init player_screen_width=player_screen_width) File "/home/axe/VirtualEnvs/py3ve/lib/python3.6/site-packages/ai2thor/controller.py", line 855, in start self.check_x_display(env['DISPLAY']) File "/home/axe/VirtualEnvs/py3ve/lib/python3.6/site-packages/ai2thor/controller.py", line 715, in check_x_display ("Invalid DISPLAY %s - cannot find X server with xdpyinfo" % x_display) AssertionError: Invalid DISPLAY :0 - cannot find X server with xdpyinfo

System Ubuntu 18.04, CUDA 10.2 Two screens & Two GPUs

MohitShridhar commented 3 years ago

@Axe--, can you follow the instructions here on setting-up ALFRED on headless machines and report back?

Axe-- commented 3 years ago

Hey, I executed the command suggested, with display 0 & 1. Using >1 lead to blank screens (resolved it by deleting the xorg.conf from recovery mode).

However, getting the following error.

~/Projects/ALFRED$ sudo python $ALFRED_ROOT/scripts/startx.py 0

Starting X on DISPLAY=:0 Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BusID "PCI:1:0:0" EndSection

Section "Screen" Identifier "Screen0" Device "Device0" DefaultDepth 24 Option "AllowEmptyInitialConfiguration" "True" SubSection "Display" Depth 24 Virtual 1024 768 EndSubSection EndSection

Section "Device" Identifier "Device1" Driver "nvidia" VendorName "NVIDIA Corporation" BusID "PCI:7:0:0" EndSection

Section "Screen" Identifier "Screen1" Device "Device1" DefaultDepth 24 Option "AllowEmptyInitialConfiguration" "True" SubSection "Display" Depth 24 Virtual 1024 768 EndSubSection EndSection

Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" 0 0 Screen 1 "Screen1" 0 0 EndSection

_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.

Axe-- commented 3 years ago

Hey sorry for spamming,

The _checkthor script worked. I simply ignored the startx script, which makes sense on a local machine as the X-server runs by default. Thank you!

(py3ve) axe@axe-H270-Gaming-3:~/Projects/ALFRED$ python scripts/check_thor.py

thor-201909061227-Linux64: [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 100% 54.5 MiB/s] of 390.MB Found path: /home/axe/.ai2thor/releases/thor-201909061227-Linux64/thor-201909061227-Linux64 Mono path[0] = '/home/axe/.ai2thor/releases/thor-201909061227-Linux64/thor-201909061227-Linux64_Data/Managed' Mono config path = '/home/axe/.ai2thor/releases/thor-201909061227-Linux64/thor-201909061227-Linux64_Data/Mono/etc' Preloaded 'ScreenSelector.so' Display 0 '24V2W1G5 24"': 1920x1080 (primary device). Display 1 'BenQ GW2480 24"': 1920x1080 (secondary device). PlayerPrefs - Creating folder: /home/axe/.config/unity3d/Allen Institute for Artificial Intelligence PlayerPrefs - Creating folder: /home/axe/.config/unity3d/Allen Institute for Artificial Intelligence/AI2-Thor Logging to /home/axe/.config/unity3d/Allen Institute for Artificial Intelligence/AI2-Thor/Player.log (300, 300, 3) Everything works!!!