rll / rllab

rllab is a framework for developing and evaluating reinforcement learning algorithms, fully compatible with OpenAI Gym.
Other
2.89k stars 803 forks source link

A lot of scripts aren't working in example folder #150

Open ViktorM opened 7 years ago

ViktorM commented 7 years ago

All of the scripts trpo_gym_tf_cartpole.py, trpo_gym_tf_cartpole.py, trpo_cartpole_pickled.py, ddpg_cartpole.py stopped working just after the start with the same error message:

rllab\examples>python trpo_gym_cartpole.py
WARNING (theano.sandbox.cuda): The cuda backend is deprecated and will be removed in the next release (v0.10).  Please switch to the gpuarray backend. You can get more information about how to switch at this URL:
 https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29

Using gpu device 0: GeForce GTX TITAN X (CNMeM is disabled, cuDNN 5110)
python C:\Deep_RL\Isaac\Isaac_GTC\rllab\scripts/run_experiment_lite.py  --seed '1'  --variant_data 'gAN9cQBYCAAAAGV4cF9uYW1lcQFYIwAAAGV4cGVyaW1lbnRfMjAxN18wNl8wNl8xNV81OV8zOF8wMDAxcQJzLg=='  --exp_name 'experiment_2017_06_06_15_59_38_0001'  --use_cloudpickle 'True'  --snapshot_mode 'last'  --args_data 'gAJjY2xvdWRwaWNrbGUuY2xvdWRwaWNrbGUKX2ZpbGxfZnVuY3Rpb24KcQAoY2Nsb3VkcGlja2xlLmNsb3VkcGlja2xlCl9tYWtlX3NrZWxfZnVuYwpxAWNjbG91ZHBpY2tsZS5jbG91ZHBpY2tsZQpfYnVpbHRpbl90eXBlCnECWAgAAABDb2RlVHlwZXEDhXEEUnEFKEsASwBLBUsRS0djX2NvZGVjcwplbmNvZGUKcQZYjAAAAHQAAHQBAGQBAMKDAQDCgwEAfQEAdAIAZAIAfAEAagMAZAMAZBEAwoMAAn0CAHQEAGQCAHwBAGoDAMKDAAF9AwB0BQBkBQB8AQBkBgB8AgBkBwB8AwBkCABkCQBkCgB8AQBqBgBkCwBkDABkDQBkDgBkDwBkEADCgwAIfQQAfAQAagcAwoMAAAFkAABTcQdYBgAAAGxhdGluMXE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: run_experiment_lite.py [-h] [--n_parallel N_PARALLEL]
                              [--exp_name EXP_NAME] [--log_dir LOG_DIR]
                              [--snapshot_mode SNAPSHOT_MODE]
                              [--snapshot_gap SNAPSHOT_GAP]
                              [--tabular_log_file TABULAR_LOG_FILE]
                              [--text_log_file TEXT_LOG_FILE]
                              [--params_log_file PARAMS_LOG_FILE]
                              [--variant_log_file VARIANT_LOG_FILE]
                              [--resume_from RESUME_FROM] [--plot PLOT]
                              [--log_tabular_only LOG_TABULAR_ONLY]
                              [--seed SEED] [--args_data ARGS_DATA]
                              [--variant_data VARIANT_DATA]
                              [--use_cloudpickle USE_CLOUDPICKLE]
run_experiment_lite.py: error: argument --seed: invalid int value: "'1'"
dementrock commented 7 years ago

That's interesting. What's the version of argparse?

It might be a windows compatibility issue? I guess it could be resolved by changing the type of seed in run_experiment_lite.py to str, and then convert it to int afterwards.

ViktorM commented 7 years ago

I'll be able to check argparse version tomorrow and will try your suggestion too. Code with algo.train() call - trpo_cartpole.py, trpo_cartpole_recurrent.py and vpg.py in sandbox/rocky/tf is successfully working and training, a problem occurs only with run_experiment_lite()

ViktorM commented 7 years ago

1) I have an argparse-1.4.0 2) I was able to start running Theano trpo_cartpole_pickled.py and ddpg_cartpole.py from rllab\examples by making --seed and --n_parallel strings instead of int but it is a bit weird, in my previous experiments, not with rllab, argparse worked the same on Ubunta and Windows 10. 3) Also to run an examples I had to fix paths, as for Window there should be no ':' in paths like C:/somedir 4) Plot=true hasn't been working, I've got:

Process Process-1:
Traceback (most recent call last):
  File "C:\Users\vmakoviychuk\AppData\Local\Continuum\Anaconda3\envs\Isaac\lib\multiprocessing\process.py", line 249, in _bootstrap
    self.run()
  File "C:\Users\vmakoviychuk\AppData\Local\Continuum\Anaconda3\envs\Isaac\lib\multiprocessing\process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Deep_RL\Isaac\Isaac_GTC\rllab\rllab\plotter\plotter.py", line 27, in _worker_start
    msg = queue.get_nowait()
AttributeError: 'NoneType' object has no attribute 'get_nowait' 

5) For both scripts I've got an error after the end of the 1st epoch:

Traceback (most recent call last):
  File "C:\Deep_RL\Isaac\Isaac_GTC\rllab\scripts/run_experiment_lite.py", line 143, in <module>
    run_experiment(sys.argv)
  File "C:\Deep_RL\Isaac\Isaac_GTC\rllab\scripts/run_experiment_lite.py", line 127, in run_experiment
    method_call(variant_data)
  File "ddpg_cartpole.py", line 40, in run_task
    algo.train()
  File "C:\Deep_RL\Isaac\Isaac_GTC\rllab\rllab\algos\ddpg.py", line 256, in train
    logger.save_itr_params(epoch, params)
  File "C:\Deep_RL\Isaac\Isaac_GTC\rllab\rllab\misc\logger.py", line 232, in save_itr_params
    raise NotImplementedError
andreafranceschetti commented 6 years ago

Hi @ViktorM, im facing similar problems.. How did you manage to fix paths for Win10? Also, which version of TF were you running if i may ask? Because many tf scripts seems to require Theano, and i'm having trouble tracking down its dependancies, which i don't know if are all necessary. Thank you for your help