Skip to content

Commit 48878f0

Browse files
committed
updated readmes
1 parent b4726ac commit 48878f0

File tree

2 files changed

+26
-50
lines changed

2 files changed

+26
-50
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,12 @@
11
# Contributing
22

3-
## Proposal for vanilla installation
4-
5-
Most dependencies even for the extras can just be automatically installed. However, there's two exceptions: ray (as we install from URL which PyPI does not allow) and tensorflow (as we need two different versions).
3+
## Developer Installation
64

7-
Installation from PyPI should work like this:
5+
For development, manual installation is the easiest way to stay up-to-date:
86
```bash
9-
pip install mdp_playground
10-
11-
# if either extra is needed:
12-
pip install tensorflow==1.13.0rc1
13-
pip install ray[rllib,debug]==0.7.3
14-
pip install mdp_playground[extras_cont]
15-
16-
# respectively:
17-
pip install tensorflow==2.2.0
18-
wget 'https://ray-wheels.s3-us-west-2.amazonaws.com/master/8d0c1b5e068853bf748f72b1e60ec99d240932c6/ray-0.9.0.dev0-cp36-cp36m-manylinux1_x86_64.whl'
19-
pip install ray-0.9.0.dev0-cp36-cp36m-manylinux1_x86_64.whl[rllib,debug]
20-
pip install mdp_playground[extras_disc]
21-
7+
pip install -e .[extras]
228
```
239

24-
## Developer Installation
25-
2610
In addition to the standard dependencies, please install the following:
2711
```bash
2812
pip install sphinx, sphinx-book-theme # for generating documentation
@@ -35,12 +19,14 @@ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poet
3519

3620
The `pyproject.toml` is set up using `poetry`.
3721

38-
Build via `poetry build`, and publish via `poetry publish`.
22+
Build via `poetry build`, and publish via `poetry publish`. There are automatic workflows in place to build and publish on new package revisions.
23+
24+
To enable manual installation with `poetry`, we also include a `setup.py` which needs to be kept up-to-date.
3925

4026

4127
## Docs
4228

43-
The documentation can be build using sphinx via:
29+
The documentation can be built using sphinx via:
4430
```bash
4531
cd docs
4632
make html
@@ -56,7 +42,3 @@ To publish:
5642
```bash
5743
git subtree push --prefix docs/_build/html/ origin gh-pages
5844
```
59-
60-
## WIP
61-
62-
Add CI/CD for codecov etc.

README.md

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,24 @@ There are 4 parts to the package:
3232
4) **Analysis**: [`plot_experiments.ipynb`](plot_experiments.ipynb) contains code to plot the standard plots from the paper.
3333

3434
## Installation
35-
### Manual
35+
36+
### Production use
37+
We recommend using `conda` to manage environments. After setup of the environment, you can install MDP Playground in two ways:
38+
#### Manual
39+
To install MDP Playground manually, clone the repository and run:
40+
```bash
41+
pip install -e .[extras]
42+
```
43+
This might be the preferred way if you want easy access to the included experiments.
44+
45+
#### From PyPI
46+
MDP Playground is also on PyPI. Just run:
47+
```bash
48+
pip install mdp_playground[extras]
49+
```
50+
51+
52+
### Reproducing results from the paper
3653
We recommend using `conda` environments to manage virtual `Python` environments to run the experiments. Unfortunately, you will have to maintain 2 environments - 1 for the "older" **discrete toy** experiments and 1 for the "newer" **continuous and complex** experiments from the paper. As mentioned in Appendix P in the paper, this is because of issues with Ray, the library that we used for our baseline agents.
3754

3855
Please follow the following commands to install for the discrete toy experiments:
@@ -53,37 +70,14 @@ wget 'https://ray-wheels.s3-us-west-2.amazonaws.com/master/8d0c1b5e068853bf748f7
5370
pip install ray-0.9.0.dev0-cp36-cp36m-manylinux1_x86_64.whl[rllib,debug]
5471
```
5572

56-
### From PyPI
57-
MDP Playground is also on PyPI. As with the manual installation, we recommend using `conda` to manage environments. After setup of the environment, you can install MDP Playground like this:
58-
```bash
59-
# for production use:
60-
pip install tensorflow==2.2.0
61-
wget 'https://ray-wheels.s3-us-west-2.amazonaws.com/master/8d0c1b5e068853bf748f72b1e60ec99d240932c6/ray-0.9.0.dev0-cp36-cp36m-manylinux1_x86_64.whl'
62-
pip install ray-0.9.0.dev0-cp36-cp36m-manylinux1_x86_64.whl[rllib,debug]
63-
pip install mdp_playground
64-
65-
# for the discrete toy experiments:
66-
pip install tensorflow==1.13.0rc1
67-
pip install ray[rllib,debug]==0.7.3
68-
pip install mdp_playground[extras_cont]
69-
70-
# for the continuous and complex experiments:
71-
pip install tensorflow==2.2.0
72-
wget 'https://ray-wheels.s3-us-west-2.amazonaws.com/master/8d0c1b5e068853bf748f72b1e60ec99d240932c6/ray-0.9.0.dev0-cp36-cp36m-manylinux1_x86_64.whl'
73-
pip install ray-0.9.0.dev0-cp36-cp36m-manylinux1_x86_64.whl[rllib,debug]
74-
pip install mdp_playground[extras_disc]
75-
```
76-
77-
Instead of calling `$ python run_experiments.py` in the cloned repository, you can then use `$ run-mdpp-experiments` from anywhere. Note, that you still need to specify the path to to the experiment's configuration file. Thus, for reproducing the experiments from the paper, the manual installation is the easier option.
78-
7973
## Running experiments
8074
For reproducing experiments from the main paper, please see [below](#running-experiments-from-the-main-paper).
8175

8276
For general instructions, please continue reading.
8377

8478
You can run experiments using:
8579
```
86-
python run_experiments.py -c <config_file> -e <exp_name> -n <config_num>
80+
run-mdpp-experiments -c <config_file> -e <exp_name> -n <config_num>
8781
```
8882
The `exp_name` is a prefix for the filenames of CSV files where stats for the experiments are recorded. The CSV stats files will be saved to the current directory.<br>
8983
Each of the command line arguments has defaults. Please refer to the documentation inside [`run_experiments.py`](run_experiments.py) for further details on the command line arguments. (Or run it with the `-h` flag to bring up help.)

0 commit comments

Comments
 (0)