tensorflow / agents

TF-Agents: A reliable, scalable and easy to use TensorFlow library for Contextual Bandits and Reinforcement Learning.
Apache License 2.0
2.78k stars 716 forks source link

Incorect example to run dqn_train_eval_rnn.py #776

Open karnehm opened 1 year ago

karnehm commented 1 year ago

To run https://github.com/tensorflow/agents/blob/master/tf_agents/examples/dqn/dqn_train_eval_rnn.py the example in the comments says:


To run DQN-RNNs on MaskedCartPole:
\```bash
tensorboard --logdir $HOME/tmp/dqn/gym/MaskedCartPole-v0/ --port 2223 &
python tf_agents/experimental/examples/dqn/dqn_train_eval_rnn.py \
  --root_dir=/tmp/dqn_maskedcartpole \
  --env_name='MaskedCartPole-v0' \
  --train_sequence_length=20
\```

This follows in two errors. The logdir of tensorboard and the root_dir aren't compatible. Also the path to dqn_train_eval_rnn.py is incorrect.

The correct comment would be:

To run DQN-RNNs on MaskedCartPole:

\```bash
tensorboard --logdir $HOME/tmp/dqn/gym/MaskedCartPole-v0/ --port 2223 &
python tf_agents/examples/dqn/dqn_train_eval_rnn.py \
  --root_dir=$HOME/tmp/dqn/gym/MaskedCartPole-v0/ \
  --env_name='MaskedCartPole-v0' \
  --train_sequence_length=20
\```
tfboyd commented 1 year ago

Do you want to make a PR or I can just paste in the change? Both are totally fine and thank you.

karnehm commented 1 year ago

I created PR #777

Thank you too