google-research / batch_rl

Offline Reinforcement Learning (aka Batch Reinforcement Learning) on Atari 2600 games
https://offline-rl.github.io/
Apache License 2.0
520 stars 73 forks source link

configurable() got an unexpected keyword argument 'blacklist' #37

Closed massooti closed 1 year ago

massooti commented 1 year ago

Hi, Iam newibe in RL, but i want to implement the code of this article Conservative Q-Learning for Offline Reinforcement Learning

as its mentioned in Atari experiment section

i run this code

python -um batch_rl.fixed_replay.train \
  --base_dir=/tmp/batch_rl \
  --replay_dir=$DATA_DIR/Pong/1 \
  --agent_name=quantile \
  --gin_files='batch_rl/fixed_replay/configs/quantile_pong.gin' \
  --gin_bindings='FixedReplayRunner.num_iterations=1000' \
  --gin_bindings='atari_lib.create_atari_environment.game_name = "Pong"'
  --gin_bindings='FixedReplayQuantileAgent.minq_weight=1.0'

but it gives me this error:

File "/home/masooti/Projects/DQN/CQL/atari/batch_rl/fixed_replay/train.py", line 33, in <module>
    from batch_rl.fixed_replay.agents import dqn_agent
  File "/home/masooti/Projects/DQN/CQL/atari/batch_rl/fixed_replay/agents/dqn_agent.py", line 25, in <module>
    from batch_rl.fixed_replay.replay_memory import fixed_replay_buffer
  File "/home/masooti/Projects/DQN/CQL/atari/batch_rl/fixed_replay/replay_memory/fixed_replay_buffer.py", line 25, in <module>
    from batch_rl.baselines.replay_memory import logged_replay_buffer
  File "/home/masooti/Projects/DQN/CQL/atari/batch_rl/baselines/replay_memory/logged_replay_buffer.py", line 92, in <module>
    @gin.configurable(blacklist=['observation_shape', 'stack_size',
TypeError: configurable() got an unexpected keyword argument 'blacklist'

how can i fix this

please help

thank you in advanced

massooti commented 1 year ago

i found out the version it used is deprecated instead of blacklist i changed them to denylist and it works

agarwl commented 1 year ago

Yes, there's a more recent jax code too with tfds support: https://github.com/google/dopamine/tree/master/dopamine/labs/offline_rl (if that's any help)