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

Compare PPO with spinning up #579

Merged
merged 5 commits into from
Feb 9, 2023
Merged

Conversation

lihuoran
Copy link
Contributor

@lihuoran lihuoran commented Feb 9, 2023

Description

  • Modify PPO algorithm
    • Refine preprocess_batch logic.
    • Switch the order of training critic/actor in a train step.
  • Remove forbid_last in replay memory. It's meaningless after we refined PPO algorithm.
  • Make PPO hyper-parameters exactly identical to spinning up's version.

Linked issue(s)/Pull request(s)

Type of Change

  • Non-breaking bug fix
  • Breaking bug fix
  • New feature
  • Test
  • Doc update
  • Docker update

Related Component

  • Simulation toolkit
  • RL toolkit
  • Distributed toolkit

Has Been Tested

  • OS:
    • Windows
    • Mac OS
    • Linux
  • Python version:
    • 3.7
    • 3.8
    • 3.9
  • Key information snapshot(s):

Needs Follow Up Actions

  • New release package
  • New docker image

Checklist

  • Add/update the related comments
  • Add/update the related tests
  • Add/update the related documentations
  • Update the dependent downstream modules usage

@lihuoran lihuoran requested a review from Jinyu-W February 9, 2023 06:28
tests/rl/gym_wrapper/env_sampler.py Show resolved Hide resolved
@@ -75,6 +75,7 @@ def post_collect(self, info_list: list, ep: int) -> None:
self.metrics.update(cur)
# clear validation metrics
self.metrics = {k: v for k, v in self.metrics.items() if not k.startswith("val/")}
self._sample_rewards.clear()
Copy link
Collaborator

Choose a reason for hiding this comment

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

bug fix to record the-ep-only statistics?

@Jinyu-W Jinyu-W merged commit ab5e675 into rl_workflow_refine Feb 9, 2023
@Jinyu-W Jinyu-W deleted the huoran/rl_workflow_refine branch February 9, 2023 11:55
Jinyu-W added a commit that referenced this pull request Feb 17, 2023
* PPO, SAC, DDPG passed

* Explore in SAC

* Test GYM on server

* Sync server changes

* pre-commit

* Ready to try on server

* .

* .

* .

* .

* .

* Performance OK

* Move to tests

* Remove old versions

* PPO done

* Start to test AC

* Start to test SAC

* SAC test passed

* Multiple round in evaluation

* Modify config.yml

* Add Callbacks

* [wip] SAC performance not good

* [wip] still not good

* update for some PR comments; Add a MARKDOWN file (#576)

Co-authored-by: Jinyu Wang <wang.jinyu@microsoft.com>

* Use FullyConnected to replace mlp

* Update action bound

* ???

* Change gym env wrapper metrics logci

* Change gym env wrapper metrics logci

* refine env_sampler.sample under step mode

* Add DDPG. Performance not good...

* Add DDPG. Performance not good...

* wip

* Sounds like sac works

* Refactor file structure

* Refactor file structure

* Refactor file structure

* Pre-commit

* Pre commit

* Minor refinement of CIM RL

* Jinyu/rl workflow refine (#578)

* remove useless files; add device mapping; update pdoc

* add default checkpoint path; fix distributed worker log path issue; update example log path

* update performance doc

* remove tests/rl/algorithms folder

* Resolve PR comments

* Compare PPO with spinning up (#579)

* [wip] compare PPO

* PPO matching

* Revert unnecessary changes

* Minor

* Minor

* SAC Test parameters update (#580)

* fix sac to_device issue; update sac gym test parameters

* add rl test performance plot func

* update sac eval interval config

* update sac checkpoint interval config

* fix callback issue

* update plot func

* update plot func

* update plot func

* update performance doc; upload performance images

* Minor fix in callbacks; refine plot.py format.

* Add n_interactions. Use n_interactions to plot curves.

* pre-commit

---------

Co-authored-by: Huoran Li <huo53926@126.com>
Co-authored-by: Huoran Li <huoranli@microsoft.com>

* Episode truncation & early stopping (#581)

* Add truncated logic

* (To be tested) early stop

* Early stop test passed

* Test passed

* Random action. To be tested.

* Warmup OK

* Pre-commit

* random seed

* Revert pre-commit config

---------

Co-authored-by: Jinyu-W <53509467+Jinyu-W@users.noreply.github.com>
Co-authored-by: Jinyu Wang <wang.jinyu@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants