Skip to content

Commit

Permalink
docs(mkdocs): update to modules and structure for mkdocs
Browse files Browse the repository at this point in the history
github pages

Signed-off-by: Tumay Tuzcu <tumay@semiotic.ai>
  • Loading branch information
tumaysem committed Feb 8, 2023
1 parent d764476 commit 2fb40cd
Show file tree
Hide file tree
Showing 15 changed files with 171 additions and 280 deletions.
20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

66 changes: 66 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Python API


## Agents
::: autoagora_agents.agent
handler: python
options:
show_root_heading: true
heading_level: 3


::: autoagora_agents.agent_factory
handler: python
options:
show_root_heading: true
heading_level: 3

::: autoagora_agents.action_mixins
handler: python
options:
show_root_heading: true
heading_level: 3

::: autoagora_agents.policy_mixins
handler: python
options:
show_root_heading: true
heading_level: 3

::: autoagora_agents.optimizer_mixins
handler: python
options:
show_root_heading: true
heading_level: 3

::: autoagora_agents.reinforcement_learning_policy_mixins
handler: python
options:
show_root_heading: true
heading_level: 3

## Enviroments

::: environments.environment
handler: python
options:
show_root_heading: true
heading_level: 3

::: environments.environment_factory
handler: python
options:
show_root_heading: true
heading_level: 3

::: environments.shared_subgraph
handler: python
options:
show_root_heading: true
heading_level: 3

::: environments.simulated_subgraph
handler: python
options:
show_root_heading: true
heading_level: 3
45 changes: 45 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[![Coveralls](https://img.shields.io/coveralls/github/semiotic-ai/autoagora-agents)](https://coveralls.io/github/semiotic-ai/autoagora-agents)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
[![Semantic Versioning](https://img.shields.io/badge/semver-2.0.0-green)](https://semver.org/spec/v2.0.0.html)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

# AutoAgora Agents

## Developer's guide

### Installation directly from the source code

To install AutoAgora directly from the source code please clone the repository and install package in the virtual environment using `poetry`:
```console
git clone https://github.com/semiotic-ai/autoagora-agents.git
cd autoagora
poetry install
```

### Running the AutoAgora code

All scripts should be executed in the virtual environment managed by `poetry`.

### Running the test suite

```console
poetry run python -m pytest
```

### Running the bandit-related scripts

There are three scripts in the bandit_scripts folder:

- `show_simulated_subgraph.py` - runs and (optionally) visualizes the simulation (only environment)
- `show_bandit.py` - runs and (optionally) visualizes the simulation (both agent and environment)
- `train_bandit.py` - runs the simulation and trains an agent in a given environment (no visualization, logging to TensorBoard)

Each script can be parametrized by arguments passed from the command line. For example, to run the simulation with `ppo` agent in the `noisy_static` environment please run:

```console
poetry run python bandit_scripts/show_bandit.py -a ppo -e noisy_static --show
```

More details on arguments can be accessed in help (`--h`).
35 changes: 0 additions & 35 deletions docs/make.bat

This file was deleted.

44 changes: 28 additions & 16 deletions docs/source/bandit_scripts.rst → docs/sim.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,43 @@
Scripts
=======
# Simulation

show_simulated_subgraph.py
--------------------------
## Controller

Plots the environment (queries/s as a function of price multiplier) and exports it into a mp4 movie.
::: simulation.controller
handler: python
options:
show_root_heading: true
heading_level: 3

.. code:: bash
## Chart

poetry run python bandit_scripts/show_simulated_subgraph.py
::: simulation.chart
handler: python
options:
show_root_heading: true
heading_level: 3

## Scripts

show_bandit.py
---------------
### show_simulated_subgraph.py

Trains one of bandits on a selected simulated environment. Plots the agent policy (gaussian over a price multiplier) and environment (queries/s as a function of price multiplier) and exports it into a mp4 movie.
Plots the environment (queries/s as a function of price multiplier) and exports it into a mp4 movie.

```bash
poetry run python bandit_scripts/show_simulated_subgraph.py
```

.. code:: bash
### show_bandit.py

poetry run python bandit_scripts/show_bandit.py
Trains one of bandits on a selected simulated environment. Plots the agent policy (gaussian over a price multiplier) and environment (queries/s as a function of price multiplier) and exports it into a mp4 movie.

```bash
poetry run python bandit_scripts/show_bandit.py
```

train_bandit.py
---------------
### train_bandit.py

Trains one of bandits on a selected simulated environment. Monitors various variables and logs them to Tensorboard.

.. code:: bash
```bash
poetry run python bandit_scripts/train_bandit.py
```
41 changes: 0 additions & 41 deletions docs/source/agents.rst

This file was deleted.

57 changes: 0 additions & 57 deletions docs/source/conf.py

This file was deleted.

43 changes: 0 additions & 43 deletions docs/source/environments.rst

This file was deleted.

17 changes: 0 additions & 17 deletions docs/source/index.rst

This file was deleted.

Loading

0 comments on commit 2fb40cd

Please sign in to comment.