Skip to content

Commit

Permalink
- update README.md
Browse files Browse the repository at this point in the history
- update setup.py
- add python version check
  • Loading branch information
huangshiyu13 committed May 5, 2023
1 parent 9825d18 commit 64209f8
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pip install openrl
conda install -c openrl openrl
```

用户也可以从源码安装OpenRL:
想要修改源码的用户也可以从源码安装OpenRL:
```bash
git clone https://github.com/OpenRL-Lab/openrl && cd openrl
pip install -e .
Expand Down
2 changes: 1 addition & 1 deletion README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ If users are using Anaconda or Miniconda, they can also install OpenRL via conda
conda install -c openrl openrl
```

Users can also install OpenRL from source code:
Users who want to modify the source code can also install OpenRL from the source code:

```bash
git clone https://github.com/OpenRL-Lab/openrl && cd openrl
Expand Down
7 changes: 7 additions & 0 deletions examples/cartpole/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## How to Use

Users can train CartPole via:

```shell
python train_ppo.py
```
7 changes: 7 additions & 0 deletions examples/mpe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## How to Use

Users can train MPE via:

```shell
python train_ppo.py --config mpe_ppo.yaml
```
13 changes: 13 additions & 0 deletions examples/nlp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## How to Use

Users can train the dialog task via:

```shell
python train_ppo.py --config nlp_ppo.yaml
```

After the training, users can chat with the agent via:

```shell
python chat.py
```
4 changes: 4 additions & 0 deletions openrl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
__AUTHOR__ = "OpenRL Contributors"
__EMAIL__ = "huangshiyu@4paradigm.com"
__version__ = __VERSION__

import platform
python_version = platform.python_version()
assert python_version >= '3.8', f"OpenRL requires Python 3.8 or newer, but your Python is {python_version}"
4 changes: 2 additions & 2 deletions openrl/runners/common/ppo_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def __init__(

if self.run_dir is None:
assert (not self._use_wandb) and (not self._use_tensorboard), (
"log_path must be set when using wandb or tensorboard.Please set"
" log_path in PPOAgent or in the config file or pass run_dir in the"
"run_dir must be set when using wandb or tensorboard. Please set"
" run_dir in the config file or pass run_dir in the"
" command line."
)

Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@ def get_version() -> str:
"Documentation": "https://openrl-docs.readthedocs.io/zh/latest/",
},
classifiers=[
"Development Status :: 3 - Alpha",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
],
Expand Down

0 comments on commit 64209f8

Please sign in to comment.