go-explore icon indicating copy to clipboard operation
go-explore copied to clipboard

How to run Phase 1

Open njustesen opened this issue 4 years ago • 6 comments

I have installed the requirements using pip install -r requirements.txt and git clone https://github.com/uber-research/atari-reset atari_reset. I then run ./phase1_downscaled.sh breakout . 500. I get the following error:

Traceback (most recent call last):
  File "goexplore_py/main.py", line 14, in <module>
    from goexplore_py.randselectors import *
ModuleNotFoundError: No module named 'goexplore_py'

What did I do wrong?

njustesen avatar May 25 '20 08:05 njustesen

I get the same error and I did the same steps as you. Did you (@njustesen) find any solutions to this?

Kuzat avatar Sep 29 '20 21:09 Kuzat

you likely need to add goexplore_py to your python path

MishaLaskin avatar Mar 28 '21 23:03 MishaLaskin

Specifically try running

PYTHONPATH="${PYTHONPATH}:/your/path/go-explore/robustified/goexplore_py" bash phase1_montezuma.sh

MishaLaskin avatar Mar 29 '21 00:03 MishaLaskin

quick fix that worked for me: copy all files in .../go-explore/robustified/goexplore_py/ into a new folder .../go-explore/robustified/goexplore_py/goexplore_py/. then try to run it again.

Hauf3n avatar Apr 03 '21 15:04 Hauf3n

I have similar problems. I could solve some of them but changing all imports somewhat as seen i attached diffs. diff.txt

This however only works in some cases and is not a nice solution either way. It let me run ./phase1_downscaled.sh and ./gen_demo_atari.sh but does not work with phase2_atari.sh (it runs for a bit with the warnings: "Could not import complex_fetch_env, is goexplore_py in PYTHONPATH?" and "Warning: goexplore_py not in PYTHONPATH, some features will be unavailable"). It then crashes by the following, that might be some unrelated issue:

*** The MPI_Comm_test_inter() function was called before MPI_INIT was invoked. *** This is disallowed by the MPI standard. *** Your MPI job will now abort. [hampusa:29305] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!

All this while I get the following for PYTHONPATH: echo $PYTHONPATH /home/hampus/software/hypermapper/scripts:/home/hampus/rl/go-explore/robustified/goexplore_py which is where I have cloned the repo. I have tried this without the local changes as in the attached diff, but then I am just back to the original issue.

Could it somehow relate to me having multiple python versions? I installed all the requirements on my python3.6 (which is why i changed the shellscripts for me).

Your solution and results are inspiring and I want to see if I can improve them with some of the work I have been doing in my PhD, and I am happy that you are wiling to share your code. Just need to get it running first :P

Full output in terminal when running ./phase2_atari.sh is: WARNING:tensorflow:From /home/hampus/rl/go-explore/robustified/atari_reset/atari_reset/policies.py:52: The name tf.nn.rnn_cell.RNNCell is deprecated. Please use tf.compat.v1.nn.rnn_cell.RNNCell instead.

Could not import complex_fetch_env, is goexplore_py in PYTHONPATH? WARNING:tensorflow:From /home/hampus/.local/lib/python3.6/site-packages/horovod/tensorflow/init.py:152: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead.

WARNING:tensorflow:From /home/hampus/.local/lib/python3.6/site-packages/horovod/tensorflow/init.py:178: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.

initialized worker 0 Logging to /home/hampus/rl/go-explore/robustified/results_retry Autoscaling with scaling factor 1 / 845.7173401333715 (0.0011824281619226321) WARNING:tensorflow:From /home/hampus/.local/lib/python3.6/site-packages/baselines/common/misc_util.py:75: The name tf.set_random_seed is deprecated. Please use tf.compat.v1.set_random_seed instead.

Warning: goexplore_py not in PYTHONPATH, some features will be unavailable WARNING:tensorflow:From atari_reset/train_atari.py:104: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

WARNING:tensorflow:From atari_reset/train_atari.py:109: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

2021-04-27 17:11:34.808083: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2021-04-27 17:11:34.831458: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2599990000 Hz 2021-04-27 17:11:34.831780: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5465e00 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2021-04-27 17:11:34.831813: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version Using demo /home/hampus/rl/go-explore/robustified/demos *** The MPI_Comm_test_inter() function was called before MPI_INIT was invoked. *** This is disallowed by the MPI standard. *** Your MPI job will now abort. [hampusa:30199] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!

HampusAstrom avatar Apr 27 '21 15:04 HampusAstrom

Never mind. The problem was that you instructed us to do: export PYTHONPATH="${PYTHONPATH}:/your/path/go-explore/robustified/goexplore_py" when in reality the parent folder should be in the path instead: export PYTHONPATH="${PYTHONPATH}:/your/path/go-explore/robustified"

I still have trouble with: *** The MPI_Comm_test_inter() function was called before MPI_INIT was invoked. *** This is disallowed by the MPI standard. *** Your MPI job will now abort. [hampusa:30199] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!

But if I cannot solve that I will open it as a separate issue.

HampusAstrom avatar Apr 28 '21 11:04 HampusAstrom