SforAiDl / genrl

A PyTorch reinforcement learning library for generalizable and reproducible algorithm implementations with an aim to improve accessibility in RL
https://genrl.readthedocs.io
MIT License
404 stars 59 forks source link

HER Wrappers #340

Open hades-rp2010 opened 3 years ago

hades-rp2010 commented 3 years ago

Wrt #171 Have added a HERTrainer, HERGoalEnvWrapper, and a HERWrapper for the replay buffer. Some changes in the locations of the tests might be needed.. Wasnt too sure of where to put them

lgtm-com[bot] commented 3 years ago

This pull request introduces 7 alerts when merging acd87f621357d50d01e1aba7c287663db6603661 into 9b7400e2951a8221b07c5cf6f7c13054e7cb11d8 - view on LGTM.com

new alerts:

codecov[bot] commented 3 years ago

Codecov Report

Merging #340 into master will decrease coverage by 0.76%. The diff coverage is 78.59%.

@@            Coverage Diff             @@
##           master     #340      +/-   ##
==========================================
- Coverage   91.22%   90.45%   -0.77%     
==========================================
  Files          89       93       +4     
  Lines        3772     4014     +242     
==========================================
+ Hits         3441     3631     +190     
- Misses        331      383      +52     
Impacted Files Coverage Δ
genrl/core/buffers.py 73.50% <47.27%> (-21.74%) :arrow_down:
genrl/environments/her_wrapper.py 82.14% <82.14%> (ø)
genrl/environments/custom_envs/BitFlipEnv.py 83.07% <83.07%> (ø)
genrl/utils/utils.py 94.31% <90.00%> (+0.06%) :arrow_up:
genrl/trainers/her_trainer.py 92.15% <92.15%> (ø)
genrl/agents/deep/base/offpolicy.py 97.40% <100.00%> (ø)
genrl/agents/deep/dqn/base.py 94.68% <100.00%> (+0.42%) :arrow_up:
genrl/core/__init__.py 100.00% <100.00%> (ø)
genrl/core/actor_critic.py 98.00% <100.00%> (+0.05%) :arrow_up:
genrl/environments/__init__.py 100.00% <100.00%> (ø)
... and 7 more
lgtm-com[bot] commented 3 years ago

This pull request introduces 2 alerts when merging 06cb5a7539ca1ae36e7396cbec10d0af02889c50 into 9b7400e2951a8221b07c5cf6f7c13054e7cb11d8 - view on LGTM.com

new alerts:

hades-rp2010 commented 3 years ago

Awesome work! @hades-rp2010

Few questions:

  1. Have you tried training?
  2. Does the wrapper work with all off policy algorithms?
  3. Have you checked out https://github.com/eleurent/highway-env? Highway is a standard goal based env.
  1. Still working on this, should mostly be over soon.
  2. It works on all OffPolicy Agents, tested it on highway_env (Parking-v0) for cont. and BitFlipEnv for discrete
  3. Yeah, I was trying to add tests for highway_env, but was running into some problems about installing the module in the lint tests. Would probs need some help on how to do this
lgtm-com[bot] commented 3 years ago

This pull request introduces 5 alerts when merging b654d8c88cd01d45a2436e3926ccfad0ac53db81 into 147d3737b6e507e06f91221aa04c0b78cddf2232 - view on LGTM.com

new alerts:

Sharad24 commented 3 years ago

Add highway_env to the pip install ... statements in .github/workflows/tests.yml and .github/workflows/codecov.yml, should work post that.

lgtm-com[bot] commented 3 years ago

This pull request introduces 5 alerts when merging da535e2f42d1d110c89bbe8e6feea791cc505f0a into 147d3737b6e507e06f91221aa04c0b78cddf2232 - view on LGTM.com

new alerts:

lgtm-com[bot] commented 3 years ago

This pull request introduces 5 alerts when merging 9edae6495ffa261b2a683df8edb29fbeb18d42c4 into 147d3737b6e507e06f91221aa04c0b78cddf2232 - view on LGTM.com

new alerts:

sampreet-arthi commented 3 years ago

Are you done here? @hades-rp2010 If you can resolve the merge conflicts and maybe the codeclimate issues then we can merge this.

Sharad24 commented 3 years ago

I think the algorithms weren’t training here. Please ensure you get a reasonable reward :)

On 12-Oct-2020, at 12:17 PM, Sampreet notifications@github.com wrote:

Are you done here? @hades-rp2010 https://github.com/hades-rp2010 If you can resolve the merge conflicts and maybe the codeclimate issues then we can merge this.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SforAiDl/genrl/pull/340#issuecomment-706908617, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH72FJYHZVDUIXFRDDDOUELSKKQ7TANCNFSM4RJ6TMOA.