Skip to content

Commit

Permalink
Docs/extras (#270)
Browse files Browse the repository at this point in the history
* update installation instructions

* update agent instansiation in basic concepts

* update watch instructions in README

* fix np variance issue

Co-authored-by: Nota, Christopher <cnota@irobot.com>
  • Loading branch information
cpnota and Nota, Christopher committed Apr 13, 2022
1 parent 509af6b commit a682f50
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,24 @@ It also contains implementations of the following "vanilla" agents, which provid
## Installation

First, you will need a new version of [PyTorch](https://pytorch.org) (>1.3), as well as [Tensorboard](https://pypi.org/project/tensorboard/).
Then, you can install the `autonomous-learning-library` through PyPi:
Then, you can install the core `autonomous-learning-library` through PyPi:

```
pip install autonomous-learning-library
```

Alternately, you can install directly from this repository:
You can also install all of the extras (such as Gym environments) using:

```
git clone https://github.com/cpnota/autonomous-learning-library.git
cd autonomous-learning-library
pip install -e .
pip install autonomous-learning-library[all]
```

You can also install the prerequisites using:
Finally, you can install directly from this repository including the dev dependencies using:

```
pip install autonomous-learning-library[pytorch]
git clone https://github.com/cpnota/autonomous-learning-library.git
cd autonomous-learning-library
pip install -e .[dev]
```

## Running the Presets
Expand All @@ -81,7 +81,7 @@ tensorboard --logdir runs
```

and opening your browser to http://localhost:6006.
Once the model is trained to your satisfaction, you can watch the trained model play using:
Once the model is fully trained, you can watch the trained model play using:

```
all-watch-atari Breakout "runs/a2c_[id]/preset.pt"
Expand Down
2 changes: 1 addition & 1 deletion all/experiments/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _log_test_episode(self, episode, returns):
def _log_test(self, returns):
if not self._quiet:
mean = np.mean(returns)
sem = np.variance(returns) / np.sqrt(len(returns))
sem = np.var(returns) / np.sqrt(len(returns))
print('test returns (mean ± sem): {} ± {}'.format(mean, sem))
self._writer.add_summary('returns-test', np.mean(returns), np.std(returns))

Expand Down
12 changes: 6 additions & 6 deletions docs/source/guide/basic_concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,12 @@ Here is a quick example:
from all.environments import AtariEnvironment
agents = [
atari.dqn(),
atari.ddqn(),
atari.c51(),
atari.rainbow(),
atari.a2c(),
atari.ppo(),
atari.dqn,
atari.ddqn,
atari.c51,
atari.rainbow,
atari.a2c,
atari.ppo,
]
envs = [AtariEnvironment(env, device='cuda') for env in ['BeamRider', 'Breakout', 'Pong', 'Qbert', 'SpaceInvaders']]
Expand Down

0 comments on commit a682f50

Please sign in to comment.