Open amirkhango opened 6 years ago
I used virtualenv, and using that I am able to run it fine.
(dopamine-env) xxxx@ubuntu:~/github/dopamine$ python tests/atari_init_test.py 2018-08-28 10:31:31.408621: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA I0828 10:31:31.409774 140302986893056 tf_logging.py:115] Creating DQNAgent agent with the following parameters: I0828 10:31:31.410115 140302986893056 tf_logging.py:115] gamma: 0.990000 I0828 10:31:31.410213 140302986893056 tf_logging.py:115] update_horizon: 1.000000 I0828 10:31:31.410275 140302986893056 tf_logging.py:115] min_replay_history: 20000 I0828 10:31:31.410345 140302986893056 tf_logging.py:115] update_period: 4 I0828 10:31:31.410414 140302986893056 tf_logging.py:115] target_update_period: 8000 I0828 10:31:31.410485 140302986893056 tf_logging.py:115] epsilon_train: 0.010000 I0828 10:31:31.410553 140302986893056 tf_logging.py:115] epsilon_eval: 0.001000 I0828 10:31:31.410624 140302986893056 tf_logging.py:115] epsilon_decay_period: 250000 I0828 10:31:31.410692 140302986893056 tf_logging.py:115] tf_device: /gpu:0 I0828 10:31:31.410770 140302986893056 tf_logging.py:115] use_staging: True I0828 10:31:31.410842 140302986893056 tf_logging.py:115] optimizer: <tensorflow.python.training.rmsprop.RMSPropOptimizer object at 0x7f9aa2b3cc50> I0828 10:31:31.412628 140302986893056 tf_logging.py:115] Creating a OutOfGraphReplayBuffer replay memory with the following parameters: I0828 10:31:31.412767 140302986893056 tf_logging.py:115] observation_shape: 84 I0828 10:31:31.412849 140302986893056 tf_logging.py:115] stack_size: 4 I0828 10:31:31.412924 140302986893056 tf_logging.py:115] replay_capacity: 100 I0828 10:31:31.412993 140302986893056 tf_logging.py:115] batch_size: 32 I0828 10:31:31.413064 140302986893056 tf_logging.py:115] update_horizon: 1 I0828 10:31:31.413134 140302986893056 tf_logging.py:115] gamma: 0.990000 I0828 10:31:32.658776 140302986893056 tf_logging.py:115] Beginning training... W0828 10:31:32.659001 140302986893056 tf_logging.py:125] num_iterations (0) < start_iteration(0)
Ran 2 tests in 1.791s
OK
@tosandip I am using conda env but failed. I will try virtualenv as you said
Ok try it.If it doesn't work i will try with some other alternatives.
Works fine for me with conda.
Review installation instructions carefully, I think you might be missing absl-py
, for example.
if this is still failing, would you mind providing the commands you ran to install, as well as the command you use to run the test? if it's passing, we can close this. :)
@amirkhango ,I ran into the same problem, how can you fix it?
@psc-g I solved it by add this line in the setUp function in atari_init_test.py: FLAGS(["--gin_files dopamine/agents/dqn/configs/dqn.gin",]) It seems the existing line FLAGS.gin_files=xxx doesn't work for me, maybe some bug with my absl package, version=0.5.
This worked for me: ` def setUp(self):
FLAGS( [ '--gin_files' ] )
FLAGS.gin_files = [ 'dopamine/agents/dqn/configs/dqn.gin' ]
FLAGS.base_dir = os.path.join(
'/tmp/dopamine_tests',
datetime.datetime.utcnow().strftime('run_%Y_%m_%d_%H_%M_%S'))
FLAGS.agent_name = 'dqn'
# `num_iterations` set to zero to prevent runner execution.
FLAGS.gin_bindings = [
'Runner.num_iterations=0',
'WrappedReplayBuffer.replay_capacity = 100' # To prevent OOM.
]
FLAGS.alsologtostderr = True
`
FLAGS( ['--base_dir'] )
to all other tests in setUp()
When I run 'python tests/atari_init_test.py', it shows below:
====================================================================== ERROR: test_atari_init (main.AtariInitTest) Tests that a DQN agent is initialized.
Traceback (most recent call last): File "tests/atari_init_test.py", line 47, in test_atari_init train.main([]) File "/Users/kudou/Documents/codes/dopamine/dopamine/atari/train.py", line 128, in main launch_experiment(create_runner, create_agent) File "/Users/kudou/Documents/codes/dopamine/dopamine/atari/train.py", line 116, in launch_experiment run_experiment.load_gin_configs(FLAGS.gin_files, FLAGS.gin_bindings) File "/Users/kudou/anaconda2/envs/py36/lib/python3.6/site-packages/absl/flags/_flagvalues.py", line 488, in getattr raise _exceptions.UnparsedFlagAccessError(error_message) absl.flags._exceptions.UnparsedFlagAccessError: Trying to access flag --gin_files before flags were parsed.
Ran 2 tests in 0.001s
FAILED (errors=1)