Skip to content

Commit

Permalink
update readme and setup instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Schneider committed Jan 5, 2021
1 parent 5e1bdce commit 6a980f9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
results
tb

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ source venv/bin/activate
pip install -U pip

# Install the DRL package and its requirements
python setup.py install
# OR alternatively:
pip install -r requirements.txt
```

Expand All @@ -57,7 +55,7 @@ The `inputs` folder is structured as follows:
```

Based on these inputs and after installation, a correct installation of the DRL agent can be checked as follows:
Based on these inputs and after installation, a correct installation of the DRL agent can be checked as follows (ignore `tensorflow` warnings):

```
$ spr-rl --help
Expand All @@ -82,6 +80,20 @@ To train an ACKTR DRL agent for 100,000 steps then test it immediately on the Ab
$ spr-rl inputs/networks/abilene_1-5in-1eg/abilene-in1-rand-cap0-2.graphml inputs/config/drl/acktr/acktr_default_4-env.yaml inputs/config/simulator/mean-10.yaml inputs/services/abc-start_delay0.yaml 100000 -a
```

The results and trained model are saved in the `results` directory, which is created automatically.

### Tensorboard

To visualize training progress, start `tensorboard`:

```
tensorboard --logdir tb
```

Then go to http://localhost:6006

### Parallelization

The training of the agent can be parallelized via the GNU Parallel tool. A helper scripts is already provided in the `utils` folder. The inputs of the agent must be defined in the corresponding `*.txt` files inside the `utils` folder To run the parallel scripts: From the current directory, run the following command:

```
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
'numpy>=1.16.4,<=1.19.3',
'gym[atari]==0.15.7',
'mpi4py==3.0.3',
'tqdm'
'tqdm',
'networkx==2.4'
]

test_requirements = [
Expand Down

0 comments on commit 6a980f9

Please sign in to comment.