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

add promxial policy optimization template to pl_examples #5394

Merged
merged 21 commits into from
Jan 9, 2021

Conversation

sidhantls
Copy link
Contributor

@sidhantls sidhantls commented Jan 7, 2021

What does this PR do?

Adds example of implementation of proximal policy optimization in PyTorch Lightning.

I had implemented PPO in Lightning in my repo and there are some results there as well. If it's good to have an example for PPO in pl_examples, I'm happy to help add it

Fixes #5393

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified
  • Check that target branch and milestone match!

Did you have fun?

Make sure you had fun coding 🙃

@pep8speaks
Copy link

pep8speaks commented Jan 7, 2021

Hello @sid-sundrani! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-01-09 17:29:18 UTC

@sidhantls sidhantls changed the base branch from master to release/1.0.x January 7, 2021 07:25
@sidhantls
Copy link
Contributor Author

sidhantls commented Jan 7, 2021

I added my code to the wrong branch (master) and I'm merging with 1.0.x.. There seem to be 448 commits in this PR now. Not sure what to do, should i hard reset my branch to PyTorchLightning:release/1.0.x and add the file to that again?

@sidhantls sidhantls marked this pull request as draft January 7, 2021 07:30
@codecov
Copy link

codecov bot commented Jan 7, 2021

Codecov Report

Merging #5394 (6f8dc11) into release/1.2-dev (be255de) will not change coverage.
The diff coverage is n/a.

@@               Coverage Diff               @@
##           release/1.2-dev   #5394   +/-   ##
===============================================
  Coverage               93%     93%           
===============================================
  Files                  151     151           
  Lines                10619   10619           
===============================================
  Hits                  9832    9832           
  Misses                 787     787           

@Borda Borda changed the base branch from release/1.0.x to release/1.2-dev January 7, 2021 08:36
@Borda
Copy link
Member

Borda commented Jan 7, 2021

@sid-sundrani well in fact the correct for you is release/1.2-dev I have fixed it for you 🐰

@Borda Borda added feature Is an improvement or enhancement example labels Jan 7, 2021
@Borda Borda added this to the 1.2 milestone Jan 7, 2021
@sidhantls sidhantls marked this pull request as ready for review January 7, 2021 09:04
Copy link
Contributor

@teddykoker teddykoker left a comment

Choose a reason for hiding this comment

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

LGTM

@sidhantls sidhantls requested a review from tchaton January 8, 2021 06:48
Copy link
Contributor

@marload marload left a comment

Choose a reason for hiding this comment

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

Awesome!
But I have some request change for code quality. 😄

pl_examples/domain_templates/reinforce_learn_ppo.py Outdated Show resolved Hide resolved
pl_examples/domain_templates/reinforce_learn_ppo.py Outdated Show resolved Hide resolved
pl_examples/domain_templates/reinforce_learn_ppo.py Outdated Show resolved Hide resolved
pl_examples/domain_templates/reinforce_learn_ppo.py Outdated Show resolved Hide resolved
pl_examples/domain_templates/reinforce_learn_ppo.py Outdated Show resolved Hide resolved
Copy link
Contributor

@marload marload left a comment

Choose a reason for hiding this comment

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

LGTM

@tchaton tchaton enabled auto-merge (squash) January 9, 2021 17:29
@tchaton tchaton merged commit b5e7e03 into Lightning-AI:release/1.2-dev Jan 9, 2021
@sidhantls sidhantls deleted the ppo branch January 9, 2021 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example feature Is an improvement or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants