-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add partial support for dictionary observation spaces (bc, density) (#…
…785) * first pass of dict obs functionality * cleanup DictObs * add dict space to test_types.py, fix some problems * add dict-obs test for rollout * add bc.py test * cleanup * small fixes * small fixes * fix type error in interactive.py * fix introduced error in mce_irl.py * fix minor ci complaint * add basic dictobs tests * change default bc policy for dict obs space * refine rollout.py typechecks, comments * check rollout produces dictobs of correct shape * cleanup types and dictobs helpers * clean useless lines * clean up print statements * fix typos Co-authored-by: Adam Gleave <adam@gleave.me> * assert matching keys in from_obs_list * move maybe_wrap, clean rollout * change policy callable to take dict[str, np.ndarray] not dictobs * rollout info wrapper supports dictobs * fix from_obs_list key consistency check * xfail save/load tests with dictobs * doc for dictobs wrapper * don't error on int observations * lint fixes * cleanup bc test for dict obs * cleanup bc.py unwrapping * cleanup rollout.py * cleanup dictobs interface * small cleanups * coverage fixes, test fix * adjust error types * docstrings for type helpers * add dict obs space support for density * fix typos Co-authored-by: Adam Gleave <adam@gleave.me> * Adam suggestions from code review Co-authored-by: Adam Gleave <adam@gleave.me> * small changes for code review * fix docstring * remove FloatReward * Fix test_bc * Turn off GPU finding to avoid using gpu device * Check None to ensure __add__ can work * fix docstring * bypass pytype and lint test * format with black * Test dict space in density algo * black format * small fix * Add DictObs into test_wrappers * fix format * minor fix * type and lint fix * Add policy training test * suppress line too long lint check on a line * acts to obs for clarity * Add HumanReadableWrapper * fix dict env observation space * adjust wrapper and not set render_mode inside * Add additional obs check * Upgrade pytype and remove workaround for old versions * Fix test_rollout test * add RemoveHumanReadableWrapper and update ob space * Revert "add RemoveHumanReadableWrapper and update ob space" This reverts commit ee83ec5. * Revert "adjust wrapper and not set render_mode inside" This reverts commit a9b32bd. * Revert "fix dict env observation space" This reverts commit ba6a6a7. * Revert "Add HumanReadableWrapper" This reverts commit 6e5c3e8. * Revert "acts to obs for clarity" This reverts commit be79cf5. * address comments * new pytype need input directory or file * fix np.dtype * ignore typed-dict-error * context manager related fix * keep pytype checking more failures * Revert "keep pytype checking more failures" This reverts commit f5288c6. * Revert "context manager related fix" This reverts commit 5c1d751. * Revert "ignore typed-dict-error" This reverts commit 5c6e5b8. * Revert "fix np.dtype" This reverts commit 6884538. * Revert "new pytype need input directory or file" This reverts commit 15541cd. * Revert "Upgrade pytype and remove workaround for old versions" This reverts commit 194ec1a. * lint fix * fix type check * fix lint --------- Co-authored-by: Adam Gleave <adam@gleave.me> Co-authored-by: ZiyueWang25 <wfuymu@gmail.com>
- Loading branch information
1 parent
573b086
commit e6d8886
Showing
25 changed files
with
881 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.