Skip to content

feat(policy): adding return_extra to policy contracts#3757

Draft
Maximellerbach wants to merge 2 commits into
mainfrom
feat/modifying-policy-contract
Draft

feat(policy): adding return_extra to policy contracts#3757
Maximellerbach wants to merge 2 commits into
mainfrom
feat/modifying-policy-contract

Conversation

@Maximellerbach

Copy link
Copy Markdown
Member

Preparing for more world models

Adding a return_extra kwargs to predict_action_chunk and select_action.
Main idea behind this is to prepare for different kind of models that might generate things other than actions at runtime.

Why an extra kwarg ?
-> the consumer decides wether he should have the extra data or not, for instance at inference it can be opted out.

The policy would have to implement something like:

if return_extra:
    extra = self._compute_extra(something)
    return action, extra
return action

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.

1 participant