tensorflow / agents

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

Incorect example to run dqn_train_eval_rnn.py #776

Open karnehm opened 2 years ago

karnehm commented 2 years 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 2 years 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 2 years ago

I created PR #777

Thank you too