Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Changed signature of reset and sample methods to use a model state dictionary #129

Merged
merged 1 commit into from
Oct 1, 2021

Conversation

luisenp
Copy link
Contributor

@luisenp luisenp commented Sep 27, 2021

Types of changes

  • Model.reset() and Model.sample() signature has changed. They no longer receive
    TransitionBatch objects, and they both return a dictionary of strings to tensors
    representing a model state that should be passed to sample() to simulate
    transitions. This dictionary can contain things like previous actions, predicted
    observation, latent states, beliefs, and any other such quantity that the model
    need to maintain to simulate trajectories when using ModelEnv.
  • Ensemble class and sub-classes are assumed to operate on 1-D models.
  • 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)

Motivation and Context / Related issue

This change facilitates some of the work necessary to complete the PlaNet implementation in #86, and should allow more flexibility in the types of models that can be simulated with ModelEnv.

How Has This Been Tested (if it applies)

All unit tests pass and PETS notebook runs correctly.

Checklist

  • The documentation is up-to-date with the changes I made.
  • I have read the CONTRIBUTING document and completed the CLA (see CONTRIBUTING).
  • All tests passed, and additional code has been covered with new tests.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 27, 2021
@luisenp luisenp merged commit 58666e8 into main Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants