Skip to content

Refine RL workflow & tune RL models under GYM#577

Merged
Jinyu-W merged 49 commits intov0.3from
rl_workflow_refine
Feb 17, 2023
Merged

Refine RL workflow & tune RL models under GYM#577
Jinyu-W merged 49 commits intov0.3from
rl_workflow_refine

Conversation

@lihuoran
Copy link
Copy Markdown
Contributor

@lihuoran lihuoran commented Feb 6, 2023

Description

  • Refine RL workflow
    • Refine rollout workflow. Now we can:
      • Run specific number of steps in rollout.
      • Use num_eval_episodes to control the number of episodes during evaluation.
    • Add AbsEnvSampler.metrics. Let env samplers use this attribute to manage metrics during rollout.
    • Add Callback, a generate interface to add customized operations in each phase of the workflow. Add two Callback instances: Checkpoint & MetricsRecorder.
    • Other miner code refinements.
  • Tune RL models under GYM
    • Add DDPG. Optimize the performance of PPO, SAC, and DDPG.
    • Fix several RL algorithm bugs.
    • Re-organize RL jobs' output paths.
    • Re-organize RL test's file structure.

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 6, 2023 05:58
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 6, 2023

Codecov Report

Merging #577 (9371949) into v0.3 (214383f) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             v0.3     #577   +/-   ##
=======================================
  Coverage   79.30%   79.30%           
=======================================
  Files          86       86           
  Lines        5464     5464           
=======================================
  Hits         4333     4333           
  Misses       1131     1131           
Flag Coverage Δ
unittests 79.30% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

lihuoran and others added 2 commits February 8, 2023 13:53
* 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
@@ -10,7 +10,7 @@

job: cim_rl_workflow
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

TODO: runtime error

lihuoran and others added 4 commits February 9, 2023 15:20
* [wip] compare PPO

* PPO matching

* Revert unnecessary changes

* Minor

* Minor
* 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 <[email protected]>
Co-authored-by: Huoran Li <[email protected]>
* 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
@Jinyu-W Jinyu-W merged commit b8a955e into v0.3 Feb 17, 2023
@lihuoran lihuoran deleted the rl_workflow_refine branch February 22, 2023 04:53
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.

2 participants