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

Update Input Template of RL Policy to Improve Module Flexisiblity #589

Merged
merged 9 commits into from
Mar 29, 2023

Conversation

Jinyu-W
Copy link
Collaborator

@Jinyu-W Jinyu-W commented Mar 28, 2023

Description

RL Workflow:

  • add customized_callbacks to RLComponentBundle
  • add env.tick to replace the default None in AbsEnvSampler._get_global_and_agent_state()

RL Algorithms:

  • fix RL algorithms to_device issue
  • add **kwargs to support more problem setting (e.g., Graph based ones)
    • add **kwargs to RL models' forward funcs and _shape_check()
    • add **kwargs to RL policies' get_action related funcs and _post_check()
    • add **kwargs to choose_actions of AbsEnvSampler; remain it None in current sample() and eval()
  • add detached loss to the return value of update_critic() and update_actor() of current TrainOps; add default False early_stop to update_actor() of current TrainOps

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

@Jinyu-W Jinyu-W requested a review from lihuoran March 28, 2023 08:25
@@ -351,6 +360,7 @@ def _shape_check(
self,
states: torch.Tensor,
actions: torch.Tensor = None,
**kwargs,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is **kwargs used in _shape_check()? Or you just want to keep it for future flexibility?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not used yet. Only for future flexibility.

@Jinyu-W Jinyu-W changed the title V0.3 update rl input Update Input Template of RL Policy to Improve Module Flexisiblity Mar 29, 2023
@Jinyu-W Jinyu-W merged commit 71157f8 into v0.3 Mar 29, 2023
@Jinyu-W Jinyu-W deleted the v0.3_update_rl_input branch March 29, 2023 13:55
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