Open sdpkjc opened 1 year ago
So, the gin file should be modified to
JaxFullRainbowAgent.epsilon_fn = @loss_helpers.reincarnation_linearly_decaying_epsilon
. Can you maybe also send a pull request with these changes?
Thank for you reply!
I modified JaxFullRainbowAgent.epsilon_fn
in file reincarnating_rl/configs/qdagger_drq.gin
and file reincarnating_rl/configs/qdagger_rainbow.gin
to @loss_helpers.reincarnation_linearly_decaying_epsilon
, but it still didn't work.
Error Infos:
2023-03-10 09:52:30.681166: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-03-10 09:52:30.779437: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/cv2/../../lib64:
2023-03-10 09:52:30.779487: I tensorflow/compiler/xla/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/tensorflow/python/framework/dtypes.py:246: DeprecationWarning: `np.bool8` is a deprecated alias for `np.bool_`. (Deprecated NumPy 1.24)
np.bool8: (False, True),
2023-03-10 09:52:31.232661: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/cv2/../../lib64:
2023-03-10 09:52:31.232714: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/cv2/../../lib64:
2023-03-10 09:52:31.232723: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/tf/__init__.py:48: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if (distutils.version.LooseVersion(tf.__version__) <
/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/jax/_src/api_util.py:240: SyntaxWarning: Jitted function has invalid argnames {'distill_type', 'distill_temperature', 'distill_loss_coefficient', 'distill_best_action_only'} in static_argnames. Function does not take these args.This warning will be replaced by an error after 2022-08-20 at the earliest.
warnings.warn(f"Jitted function has invalid argnames {invalid_argnames} "
2023-03-10 09:52:32.407890: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/cv2/../../lib64:
2023-03-10 09:52:32.407952: W tensorflow/compiler/xla/stream_executor/cuda/cuda_driver.cc:265] failed call to cuInit: UNKNOWN ERROR (303)
2023-03-10 09:52:32.407987: I tensorflow/compiler/xla/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (sdpkjc008-B460MAORUSPRO): /proc/driver/nvidia/version does not exist
I0310 09:52:32.408150 140470457111616 train.py:126] Setting random seed: 1
W0310 09:52:32.412673 140470457111616 run_experiment.py:267] DEPRECATION WARNING: Logger is being deprecated. Please switch to CollectorDispatcher!
/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gym/envs/registration.py:593: UserWarning: [33mWARN: The environment PongNoFrameskip-v0 is out of date. You should consider upgrading to version `v4`.[0m
logger.warn(
A.L.E: Arcade Learning Environment (version 0.7.5+db37282)
[Powered by Stella]
/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gym/core.py:317: DeprecationWarning: [33mWARN: Initializing wrapper in old step API which returns one bool instead of two. It is recommended to set `new_step_api=True` to use new step API. This will be the default behaviour in future.[0m
deprecation(
/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gym/wrappers/step_api_compatibility.py:39: DeprecationWarning: [33mWARN: Initializing environment in old step API which returns one bool instead of two. It is recommended to set `new_step_api=True` to use new step API. This will be the default behaviour in future.[0m
deprecation(
I0310 09:52:32.514550 140470457111616 reincarnation_rainbow_agent.py:43] Creating ReincarnationRainbowAgent agent with the following parameters:
I0310 09:52:32.514734 140470457111616 reincarnation_rainbow_agent.py:45] num_updates_per_persistent_step: 1
I0310 09:52:32.514835 140470457111616 reincarnation_rainbow_agent.py:47] data_augmentation: False
I0310 09:52:32.514869 140470457111616 reincarnation_rainbow_agent.py:48] network: <class 'dopamine.jax.networks.FullRainbowNetwork'>
I0310 09:52:32.515293 140470457111616 full_rainbow_agent.py:224] Creating QDaggerRainbowAgent agent with the following parameters:
I0310 09:52:32.515471 140470457111616 full_rainbow_agent.py:226] double_dqn: False
I0310 09:52:32.515506 140470457111616 full_rainbow_agent.py:227] noisy_networks: False
I0310 09:52:32.515537 140470457111616 full_rainbow_agent.py:228] dueling_dqn: False
I0310 09:52:32.515613 140470457111616 full_rainbow_agent.py:229] distributional: True
I0310 09:52:32.515684 140470457111616 full_rainbow_agent.py:230] mse_loss: 0
I0310 09:52:32.515713 140470457111616 full_rainbow_agent.py:231] num_atoms: 51
I0310 09:52:32.515762 140470457111616 full_rainbow_agent.py:232] replay_scheme: prioritized
I0310 09:52:32.515809 140470457111616 full_rainbow_agent.py:233] num_updates_per_train_step: 1
I0310 09:52:32.525550 140470457111616 xla_bridge.py:413] Unable to initialize backend 'tpu_driver': NOT_FOUND: Unable to find driver in registry given worker:
I0310 09:52:32.525683 140470457111616 xla_bridge.py:413] Unable to initialize backend 'cuda': module 'jaxlib.xla_extension' has no attribute 'GpuAllocatorConfig'
I0310 09:52:32.525734 140470457111616 xla_bridge.py:413] Unable to initialize backend 'rocm': module 'jaxlib.xla_extension' has no attribute 'GpuAllocatorConfig'
I0310 09:52:32.526005 140470457111616 xla_bridge.py:413] Unable to initialize backend 'tpu': INVALID_ARGUMENT: TpuPlatform is not available.
I0310 09:52:32.526068 140470457111616 xla_bridge.py:413] Unable to initialize backend 'plugin': xla_extension has no attributes named get_plugin_device_client. Compile TensorFlow with //tensorflow/compiler/xla/python:enable_plugin_device set to true (defaults to false) to enable this.
W0310 09:52:32.526121 140470457111616 xla_bridge.py:420] No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)
I0310 09:52:32.544177 140470457111616 dqn_agent.py:278] Creating QDaggerRainbowAgent agent with the following parameters:
I0310 09:52:32.544276 140470457111616 dqn_agent.py:280] gamma: 0.990000
I0310 09:52:32.544321 140470457111616 dqn_agent.py:281] update_horizon: 3.000000
I0310 09:52:32.544353 140470457111616 dqn_agent.py:282] min_replay_history: 20000
I0310 09:52:32.544383 140470457111616 dqn_agent.py:283] update_period: 4
I0310 09:52:32.544418 140470457111616 dqn_agent.py:284] target_update_period: 8000
I0310 09:52:32.544449 140470457111616 dqn_agent.py:285] epsilon_train: 0.010000
I0310 09:52:32.544476 140470457111616 dqn_agent.py:286] epsilon_eval: 0.001000
I0310 09:52:32.544504 140470457111616 dqn_agent.py:287] epsilon_decay_period: 50000
I0310 09:52:32.544531 140470457111616 dqn_agent.py:288] optimizer: adam
I0310 09:52:32.544557 140470457111616 dqn_agent.py:289] seed: 1
I0310 09:52:32.544584 140470457111616 dqn_agent.py:290] loss_type: mse
I0310 09:52:32.544611 140470457111616 dqn_agent.py:291] preprocess_fn: <function preprocess_inputs_with_augmentation at 0x7fc1235a1e50>
I0310 09:52:32.544739 140470457111616 dqn_agent.py:292] summary_writing_frequency: 25000
I0310 09:52:32.544775 140470457111616 dqn_agent.py:293] allow_partial_reload: False
2023-03-10 09:52:32.545303: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
I0310 09:52:32.600445 140470457111616 circular_replay_buffer.py:157] Creating a OutOfGraphPrioritizedReplayBuffer replay memory with the following parameters:
I0310 09:52:32.600550 140470457111616 circular_replay_buffer.py:160] observation_shape: (84, 84)
I0310 09:52:32.600592 140470457111616 circular_replay_buffer.py:161] observation_dtype: <class 'jax.numpy.uint8'>
I0310 09:52:32.600625 140470457111616 circular_replay_buffer.py:162] terminal_dtype: <class 'numpy.uint8'>
I0310 09:52:32.600655 140470457111616 circular_replay_buffer.py:163] stack_size: 4
I0310 09:52:32.600683 140470457111616 circular_replay_buffer.py:164] replay_capacity: 1000000
I0310 09:52:32.600711 140470457111616 circular_replay_buffer.py:165] batch_size: 32
I0310 09:52:32.600739 140470457111616 circular_replay_buffer.py:166] update_horizon: 3
I0310 09:52:32.600765 140470457111616 circular_replay_buffer.py:167] gamma: 0.990000
I0310 09:52:32.600794 140470457111616 circular_replay_buffer.py:168] checkpoint_duration: 4
I0310 09:52:32.600822 140470457111616 circular_replay_buffer.py:169] keep_every: None
I0310 09:52:33.608599 140470457111616 loss_helpers.py:83] Creating Adam optimizer with settings lr=0.000063, beta1=0.900000, beta2=0.999000, eps=0.000150
Traceback (most recent call last):
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/sdpkjc008/dev/reincarnating_rl/reincarnating_rl/train.py", line 174, in <module>
app.run(main)
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/absl/app.py", line 308, in run
_run_main(main, args)
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/absl/app.py", line 254, in _run_main
sys.exit(main(argv))
File "/home/sdpkjc008/dev/reincarnating_rl/reincarnating_rl/train.py", line 162, in main
runner = runner_fn(
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper
utils.augment_exception_message_and_reraise(e, err_str)
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
raise proxy.with_traceback(exception.__traceback__) from None
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper
return fn(*new_args, **new_kwargs)
File "/home/sdpkjc008/dev/reincarnating_rl/reincarnating_rl/run_experiment.py", line 301, in __init__
super().__init__(
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper
utils.augment_exception_message_and_reraise(e, err_str)
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
raise proxy.with_traceback(exception.__traceback__) from None
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper
return fn(*new_args, **new_kwargs)
File "/home/sdpkjc008/dev/reincarnating_rl/reincarnating_rl/run_experiment.py", line 76, in __init__
super().__init__(
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper
utils.augment_exception_message_and_reraise(e, err_str)
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
raise proxy.with_traceback(exception.__traceback__) from None
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper
return fn(*new_args, **new_kwargs)
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/dopamine/discrete_domains/run_experiment.py", line 229, in __init__
self._agent = create_agent_fn(self._sess, self._environment,
File "/home/sdpkjc008/dev/reincarnating_rl/reincarnating_rl/train.py", line 103, in create_agent
return agent_fn(
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper
utils.augment_exception_message_and_reraise(e, err_str)
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
raise proxy.with_traceback(exception.__traceback__) from None
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper
return fn(*new_args, **new_kwargs)
File "/home/sdpkjc008/dev/reincarnating_rl/reincarnating_rl/qdagger_rainbow_agent.py", line 153, in __init__
super().__init__(
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper
utils.augment_exception_message_and_reraise(e, err_str)
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
raise proxy.with_traceback(exception.__traceback__) from None
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper
return fn(*new_args, **new_kwargs)
File "/home/sdpkjc008/dev/reincarnating_rl/reincarnating_rl/reincarnation_rainbow_agent.py", line 50, in __init__
super().__init__(
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper
utils.augment_exception_message_and_reraise(e, err_str)
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
raise proxy.with_traceback(exception.__traceback__) from None
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper
return fn(*new_args, **new_kwargs)
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/dopamine/labs/atari_100k/atari_100k_rainbow_agent.py", line 106, in __init__
super().__init__(
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper
utils.augment_exception_message_and_reraise(e, err_str)
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
raise proxy.with_traceback(exception.__traceback__) from None
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper
return fn(*new_args, **new_kwargs)
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/dopamine/jax/agents/full_rainbow/full_rainbow_agent.py", line 248, in __init__
super().__init__(
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper
utils.augment_exception_message_and_reraise(e, err_str)
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
raise proxy.with_traceback(exception.__traceback__) from None
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper
return fn(*new_args, **new_kwargs)
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/dopamine/jax/agents/dqn/dqn_agent.py", line 336, in __init__
self._build_networks_and_optimizer()
File "/home/sdpkjc008/dev/reincarnating_rl/reincarnating_rl/qdagger_rainbow_agent.py", line 186, in _build_networks_and_optimizer
self.optimizer = loss_helpers.create_pretraining_optimizer(
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper
utils.augment_exception_message_and_reraise(e, err_str)
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
raise proxy.with_traceback(exception.__traceback__) from None
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper
return fn(*new_args, **new_kwargs)
File "/home/sdpkjc008/dev/reincarnating_rl/reincarnating_rl/loss_helpers.py", line 85, in create_pretraining_optimizer
return wrapper_fn(optax.adam)(
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/site-packages/optax/_src/schedule.py", line 579, in wrapped_transform
elif isinstance(value, (int, float, chex.Array)):
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/typing.py", line 720, in __instancecheck__
return self.__subclasscheck__(type(obj))
File "/home/sdpkjc008/anaconda3/envs/rrl/lib/python3.9/typing.py", line 723, in __subclasscheck__
raise TypeError("Subscripted generics cannot be used with"
TypeError: Subscripted generics cannot be used with class and instance checks
In call to configurable 'create_pretraining_optimizer' (<function create_pretraining_optimizer at 0x7fc123590670>)
In call to configurable 'JaxDQNAgent' (<class 'dopamine.jax.agents.dqn.dqn_agent.JaxDQNAgent'>)
In call to configurable 'JaxFullRainbowAgent' (<class 'dopamine.jax.agents.full_rainbow.full_rainbow_agent.JaxFullRainbowAgent'>)
In call to configurable 'Atari100kRainbowAgent' (<class 'dopamine.labs.atari_100k.atari_100k_rainbow_agent.Atari100kRainbowAgent'>)
In call to configurable 'ReincarnationRainbowAgent' (<class 'reincarnating_rl.reincarnation_rainbow_agent.ReincarnationRainbowAgent'>)
In call to configurable 'QDaggerRainbowAgent' (<class 'reincarnating_rl.qdagger_rainbow_agent.QDaggerRainbowAgent'>)
In call to configurable 'Runner' (<class 'dopamine.discrete_domains.run_experiment.Runner'>)
In call to configurable 'RunnerWithTeacher' (<class 'reincarnating_rl.run_experiment.RunnerWithTeacher'>)
In call to configurable 'ReincarnationRunner' (<class 'reincarnating_rl.run_experiment.ReincarnationRunner'>)
I haven't seen this error before either -- seems like an issue to the arguments of the function create_pretraining_optimizer
?
Run command in README
--atari_roms_path
is not found.--gin_files reincarnating_rl/configs/qdagger_rainbow.gin
and--teacher_checkpoint_number 399
no line connector\
.I initially modified the command as follows:
But the system reported an error, I hope to get your help. 🙏
My system info:
requirements.txt
installedDQN_400
at the same level as theREADME
file