Skip to content

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

Merged
Jinyu-W merged 9 commits intov0.3from
v0.3_update_rl_input
Mar 29, 2023
Merged

Update Input Template of RL Policy to Improve Module Flexisiblity#589
Jinyu-W merged 9 commits intov0.3from
v0.3_update_rl_input

Conversation

@Jinyu-W
Copy link
Copy Markdown
Contributor

@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
self,
states: torch.Tensor,
actions: torch.Tensor = None,
**kwargs,
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.

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

Copy link
Copy Markdown
Contributor 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.

2 participants