Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deep learning Readme fixes #14

Open
wants to merge 3 commits into
base: deep-learning
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Deep_Learning_Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,41 @@ Readme.md to verify that you can build and a version of standard PCC first.
## Using a trained agent

Start a server as usual:
```shell
cd src
export LD\_LIBRARY\_PATH=$LD\_LIBRARY\_PATH:`pwd`/core/
./app/pccserver recv 9000
```

Start the udt side of the environment:
```shell
cd src
export LD\_LIBRARY\_PATH=$LD\_LIBRARY\_PATH:`pwd`/core/
./app/pccclient send 127.0.0.1 9000 --pcc-rate-control=python -pyhelper=loaded\_client -pypath=/path/to/pcc-rl/src/udt-plugins/testing/ --history-len=10 --pcc-utility-calc=linear --model-path=/path/to/your/model/
```

This should begin running the specified agent on the localhost connection. To run on a real world link, run the sender and receiver on different machines and adjust the IP addresses appropriately.

## Online training

Start a server as usual:
```shell
cd src
export LD\_LIBRARY\_PATH=$LD\_LIBRARY\_PATH:`pwd`/core/
./app/pccserver recv 9000
```

Start the gym side of the training environment from the pcc-rl repo:
```shell
cd pcc-rl/gym/training/online/
python3 shim\_solver.py
```

Start the udt side of the training environment (on the same machine as the shim\_solver):
```shell
cd src
export LD\_LIBRARY\_PATH=$LD\_LIBRARY\_PATH:`pwd`/core/
./app/pccclient send 127.0.0.1 9000 --pcc-rate-control=python -pyhelper=shim -path=/path/to/pcc-rl/src/udt-plugins/training/ --history-len=10 --pcc-utility-calc=linear
./app/pccclient send 127.0.0.1 9000 --pcc-rate-control=python -pyhelper=shim -pypath=/path/to/pcc-rl/src/udt-plugins/training/ --history-len=10 --pcc-utility-calc=linear
```

This should begin online training on the localhost connection. To train on a real world link, run the sender and receiver on different machines and adjust the IP addresses appropriately.
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export CC = g++

export CCFLAGS = -g -std=c++0x -Wall

export LDFLAGS = -Lcore -L/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu/ -lpython3.5 -lstdc++ -lpthread -lm
export LDFLAGS = -Lcore -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/ -lpython3.6 -lstdc++ -lpthread -lm

LIB_SOURCES = $(wildcard core/*.cpp)
LIB_SOURCES += $(wildcard pcc/monitor_interval/*.cpp)
Expand Down
2 changes: 1 addition & 1 deletion src/pcc/rate_control/pcc_python_rc.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <vector>

#include "pcc_rc.h"
#include <python3.5/Python.h>
#include <python3.6/Python.h>
#include <iostream>
#include <sstream>

Expand Down