-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Documentation for Cartpole Training (#180)
Basic documentation on how to run the cartpole test, what the arguments represent, and how to track metrics in tensorboard. --------- Co-authored-by: Luc Baracat <[email protected]>
- Loading branch information
Showing
5 changed files
with
139 additions
and
37 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 🔥 Getting Started | ||
|
||
In the `/experiments` folder, example runs can be found for different Gymnasium environments. | ||
|
||
For example, you can run the cartpole example using DQN with the following command: | ||
|
||
```python | ||
pdm run python experiments/train_dqn_cartpole.py | ||
``` | ||
|
||
![Alt Text](cart_pole.gif) | ||
|
||
This comes with a lot of predefined arguments, such as the learning rate, the amount of hidden layers, the batch size, etc. You can find all the arguments in the `experiments/train_dqn_cartpole.py` file. | ||
|
||
## 📊 Tensorboard | ||
|
||
To visualize the training process, you can use Tensorboard. To do so, run the following command: | ||
|
||
```bash | ||
pdm run tensorboard --logdir ./mllogs | ||
``` | ||
|
||
This will start a Tensorboard server on `localhost:6006`. You can now open your browser and go to `localhost:6006` to see the training process where you can see the rewards over time, the loss over time, etc. | ||
|
||
![Alt Text](tensorboard.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters