Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HER Wrappers #340

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft

HER Wrappers #340

wants to merge 22 commits into from

Conversation

hades-rp2010
Copy link
Member

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
Copy link

lgtm-com bot commented Sep 12, 2020

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

new alerts:

  • 7 for Unused import

@codecov
Copy link

codecov bot commented Sep 12, 2020

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%) ⬇️
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%) ⬆️
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%) ⬆️
genrl/core/__init__.py 100.00% <100.00%> (ø)
genrl/core/actor_critic.py 98.00% <100.00%> (+0.05%) ⬆️
genrl/environments/__init__.py 100.00% <100.00%> (ø)
... and 7 more

@lgtm-com
Copy link

lgtm-com bot commented Sep 12, 2020

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

new alerts:

  • 2 for Unused import

Copy link
Member

@Sharad24 Sharad24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

from genrl.trainers import OffPolicyTrainer


class HERTrainer(OffPolicyTrainer):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need to refactor this -- arent there functions here which are exact duplicates of the ones in OffPolicyTrainer?

from genrl.trainers.her_trainer import HERTrainer


class BitFlippingEnv(GoalEnv):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be in the tests?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could move this somewhere in the environments module.

@hades-rp2010
Copy link
Member Author

hades-rp2010 commented Sep 17, 2020

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
Copy link

lgtm-com bot commented Sep 17, 2020

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

new alerts:

  • 5 for Unused import

@Sharad24
Copy link
Member

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

@lgtm-com
Copy link

lgtm-com bot commented Sep 17, 2020

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

new alerts:

  • 5 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Sep 17, 2020

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

new alerts:

  • 5 for Unused import

@sampreet-arthi
Copy link
Member

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

@Sharad24
Copy link
Member

Sharad24 commented Oct 12, 2020 via email

@hades-rp2010 hades-rp2010 marked this pull request as draft October 18, 2020 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants