You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first thing you will need to do to get started is install the requirements in `requirements.txt`.
23
+
The first thing you will need to do to get started is install the requirements. If your system has an nVIDIA GPU that you should start by using:
23
24
24
25
```bash
25
26
pip install -r requirements.txt
26
27
```
27
28
28
-
The requirements include the `tensorflow-gpu` library, though if you do not have access to a GPU, you should replace this requirement with `tensorflow`.
29
+
If you have another type of GPU or you simply want to use your CPU, use:
30
+
31
+
```bash
32
+
pip install -r requirements.no-gpu.txt
33
+
```
34
+
35
+
Update your current static files, that are used by default:
36
+
```bash
37
+
python update_data.py
38
+
```
39
+
40
+
Afterwards you can simply see the currently available options:
41
+
42
+
```bash
43
+
python ./cli.py --help
44
+
```
45
+
46
+
or simply run the project with default options:
47
+
48
+
```bash
49
+
python ./cli.py opt-train-test
50
+
```
51
+
52
+
### Testing with vagrant
53
+
54
+
Start the vagrant box using:
55
+
```bash
56
+
vagrant up
57
+
```
58
+
59
+
Code will be located at /vagrant. Play and/or test with whatever package you wish.
60
+
Note: With vagrant you cannot take full advantage of your GPU, so is mainly for testing purposes
61
+
62
+
63
+
### Testing with docker
64
+
65
+
If you want to run everything within a docker container, then just use:
The database and it's data are pesisted under `data/postgres` locally.
79
+
80
+
If you want to spin a docker test environment:
81
+
```bash
82
+
./run-with-docker (cpu|gpu) (yes|no)
83
+
```
84
+
85
+
If you want to run existing tests, then just use:
86
+
```bash
87
+
./run-tests-with-docker
88
+
```
89
+
90
+
# Fire up a local docker dev environment
29
91
30
92
# Optimizing, Training, and Testing
31
93
32
94
While you could just let the agent train and run with the default PPO2 hyper-parameters, your agent would likely not be very profitable. The `stable-baselines` library provides a great set of default parameters that work for most problem domains, but we need to better.
33
95
34
-
To do this, you will need to run `optimize.py`.
96
+
To do this, you will need to run `cli.py`.
35
97
36
98
```bash
37
-
python ./optimize.py
99
+
python ./cli.py opt-train-test
38
100
```
39
101
40
102
This can take a while (hours to days depending on your hardware setup), but over time it will print to the console as trials are completed. Once a trial is completed, it will be stored in `./data/params.db`, an SQLite database, from which we can pull hyper-parameters to train our agent.
41
103
42
104
From there, you can train an agent with the best set of hyper-parameters, and later test it on completely new data to verify the generalization of the algorithm.
43
105
106
+
# Common troubleshooting
107
+
108
+
##### The specified module could not be found.
109
+
Normally this is caused by missing mpi module. You should install it according to your platorm.
If you would like to contribute, here is the roadmap for the future of this project. To assign yourself to an item, please create an Issue/PR titled with the item from below and I will add your name to the list.
0 commit comments