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

Replace imitation environments with seals #541

Merged
merged 18 commits into from
Oct 12, 2022
Merged

Conversation

Rocamonde
Copy link
Member

@Rocamonde Rocamonde commented Aug 27, 2022

Description

Fixes #501. (Depends on HumanCompatibleAI/seals#58).

@AdamGleave
Copy link
Member

Note will need to remove mentions of envs from the docs (especially once #525 is merged)

@AdamGleave AdamGleave mentioned this pull request Sep 2, 2022
@codecov
Copy link

codecov bot commented Sep 6, 2022

Codecov Report

Merging #541 (95d37ca) into master (531fa06) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #541      +/-   ##
==========================================
+ Coverage   97.45%   97.48%   +0.03%     
==========================================
  Files          88       83       -5     
  Lines        8401     8079     -322     
==========================================
- Hits         8187     7876     -311     
+ Misses        214      203      -11     
Impacted Files Coverage Δ
src/imitation/algorithms/mce_irl.py 95.95% <100.00%> (ø)
tests/algorithms/test_mce_irl.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Rocamonde
Copy link
Member Author

Tests are passing now. The errors were quite silly:

  • The first was that the base POMDP was incrementing the number of steps after the done bool had been computed, so it was always running one step over the horizon.
  • The second was that in the notebook examples, I was passing the same environment instance to each parallel vector environment instead of creating a new one.

I think that the seals pull (HumanCompatibleAI/seals#58) should be good to merge, except perhaps for adding some tests. @AdamGleave do you have any suggestions as to what tests we could add? Once we merge that, we replace the version pointer on this PR and we can merge this too.

@Rocamonde Rocamonde requested a review from AdamGleave October 11, 2022 13:21
Copy link
Member

@AdamGleave AdamGleave left a comment

Choose a reason for hiding this comment

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

Mostly looks fine -- satisfying how much code we were able to delete :) Definitely was the right move to migrate to seals.

I'm not sure about the from seals import base_envs as envs, OTOH would prefer it to just be from seals import base_envs as envs seems sufficiently generic it could easily cause clashes down the line and is another name to keep track of (what's envs? oh, it's seals.base_envs) but I'm happy to hear arguments to the contrary.

Other suggestion is to beef up the seals testing with some of the code removed in this PR. Obviously not something to resolve in this PR, but I'd feel better if we either decide against that or open an issue/PR in seals to track that before we close this PR and forget about it.

docs/algorithms/mce_irl.rst Outdated Show resolved Hide resolved
src/imitation/testing/envs.py Show resolved Hide resolved
@Rocamonde Rocamonde requested a review from AdamGleave October 12, 2022 12:09
Copy link
Member

@AdamGleave AdamGleave left a comment

Choose a reason for hiding this comment

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

LGTM

@AdamGleave AdamGleave merged commit 288c25a into master Oct 12, 2022
@AdamGleave AdamGleave deleted the imitation-envs-to-seals branch October 12, 2022 19:44
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.

Add back in imitation.envs.examples support to scripts
2 participants