Skip to content

Commit

Permalink
upgrade to d3rlpy>=2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
aiueola committed Jul 23, 2023
1 parent 89e467a commit b071eb5
Show file tree
Hide file tree
Showing 40 changed files with 12,857 additions and 14,117 deletions.
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9" # "3.11" fails with d3rlpy==1.1.1
python: "3.11"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"
jobs:
post_install:
- pip install Cython numpy
- pip install d3rlpy==1.1.1
- pip install d3rlpy>=2.0.2
- pip install scipy>=1.10.1
- pip install numpy>=1.22.4
- pip install pandas>=1.5.3
Expand Down
4 changes: 3 additions & 1 deletion FrequentlyAskedQuestions.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ env = NewGymAPIWrapper(env)

Q. xxx environment does not work on d3rlpy, which is used for model training. How should we fix it? (d3rlpy and SCOPE-RL are compatible with different version of OpenAI Gym.)

A. While SCOPE-RL is compatible with the latest API of OpenAI Gym, d3rlpy is not. Therefore, please use `OldGymAPIWrapper` provided in `scope_rl/utils.py` to enable the use of d3rlpy.
A. A. Both `scope-rl>=0.2.1` and `d3rlpy>=2.0.2` supports compatibility with `gym>=0.26.0` and `gymnasium` environments. The source is available in the `main` branch.

If you want to use the older interface of `d3rlpy`, make sure to use `scope-rl==0.1.2` and `d3rlpy==1.1.1`. Then, please use `OldGymAPIWrapper` provided in `scope_rl/utils.py` to enable the use of d3rlpy. The source is available in the `depreciated` branch.
```Python
from scope_rl.utils import OldGymAPIWrapper
env = gym.make("xxx_v0") # compatible with gym>=0.26.2 and SCOPE-RL
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ from scope_rl.dataset import SyntheticDataset
from scope_rl.policy import EpsilonGreedyHead
# import d3rlpy algorithms
from d3rlpy.algos import DoubleDQN
from d3rlpy.online.buffers import ReplayBuffer
from d3rlpy.dataset import ReplayBuffer

from d3rlpy.online.explorers import ConstantEpsilonGreedy
# import rtbgym and gym
import rtbgym
Expand Down
Loading

0 comments on commit b071eb5

Please sign in to comment.