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 to #992] Fix and refactor MoveObjectReward #1010

Merged

Conversation

vincentpierre
Copy link
Contributor

Motivation and Context

How Has This Been Tested

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@vincentpierre vincentpierre requested a review from ASzot November 21, 2022 18:24
@vincentpierre vincentpierre self-assigned this Nov 21, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Nov 21, 2022
Copy link
Contributor

@ASzot ASzot left a comment

Choose a reason for hiding this comment

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

I've tested this and it works as expected for me.

Comment on lines +163 to +164
if place_success and not is_holding_obj:
self._metric += self._config.single_rearrange_reward
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@SergioArnaud Is it possible to double count the place reward here if the task does not end after placing? I would add a if self._cur_rearrange_stage < self.num_targets to make sure of it.

Copy link
Contributor

Choose a reason for hiding this comment

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

@vincentpierre I think that case is considered in this condition. If all the objects are placed in the right place but for some reason we haven't succeded in the task (for example the agent hasn't called terminate) we give zero reward.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, nice. sorry I missed it.

@vincentpierre vincentpierre merged commit b523ec2 into facebookresearch:main Nov 21, 2022
@vincentpierre vincentpierre deleted the fix_move_obj_reward_updated branch November 21, 2022 22:29
dannymcy pushed a commit to dannymcy/habitat-lab that referenced this pull request Jul 8, 2024
…acebookresearch#1010)

* Fix and refactor MoveObjectReward

* Fix and refactor MoveObjectReward - format

* Fix and refactor MoveObjectReward - fix typo

Co-authored-by: SergioArnaud <sercharnaud@gmail.com>
Co-authored-by: vincentpierre <vincentpierre@users.noreply.github.com>
HHYHRHY pushed a commit to SgtVincent/EMOS that referenced this pull request Aug 31, 2024
…acebookresearch#1010)

* Fix and refactor MoveObjectReward

* Fix and refactor MoveObjectReward - format

* Fix and refactor MoveObjectReward - fix typo

Co-authored-by: SergioArnaud <sercharnaud@gmail.com>
Co-authored-by: vincentpierre <vincentpierre@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants