Closed DavidSlayback closed 2 years ago
Hi @DavidSlayback, Thank you for all the hard work. Can you make sure that the test suite is passing before I merge the PRs? You will need to from typing import Dict as DictType
and then use this for type checking.
I updated both PRs to make them compatible with python 3.7, and tested everything on my end! I notice that the Seaquest tests still fail and are ignored by the pre-commit workflow...would it be useful for me to try to fix this up?
Heyo, is it possible to make Brax an optional import? It comes with fairly many dependencies and I want to keep the footprint of gymnax
low. Maybe using a try
/except
import? Otherwise you need to add it to the dependencies.
try:
from brax import envs
except ImportError:
raise ImportError(
"You need to install `brax` to use the brax wrapper."
)
Done for both the wrapper itself and the test (auto-skips if Brax is not available)
Merging #35 (b18f699) into main (6682836) will decrease coverage by
0.60%
. The diff coverage is68.24%
.
@@ Coverage Diff @@
## main #35 +/- ##
==========================================
- Coverage 84.73% 84.13% -0.61%
==========================================
Files 44 46 +2
Lines 2640 2779 +139
==========================================
+ Hits 2237 2338 +101
- Misses 403 441 +38
Impacted Files | Coverage Δ | |
---|---|---|
gymnax/environments/conversions/brax.py | 0.00% <0.00%> (ø) |
|
gymnax/environments/environment.py | 77.35% <ø> (ø) |
|
gymnax/environments/minatar/seaquest.py | 33.33% <ø> (ø) |
|
gymnax/registration.py | 94.11% <ø> (ø) |
|
gymnax/environments/spaces.py | 75.71% <75.00%> (-4.68%) |
:arrow_down: |
gymnax/environments/conversions/gym.py | 96.38% <96.38%> (ø) |
|
gymnax/environments/misc/rooms.py | 94.33% <0.00%> (+8.49%) |
:arrow_up: |
Just wanted to check, is there something more you need me to do for this? I'm not really clear on the coverage issues; I supposed I could add some tests for Gymnax -> Gym spaces?
It is merged. Thank you! And sorry for the slow reply.
For after #34
Took a stab at implementing the Brax conversion wrapper and added tests to make sure it's working. A couple notes
state.qp
is no longer aQP
object, it's whatever theEnvState
for a particular environment isstate.info
field to maintain and update rng key and env_params so that thestep
andreset
APIs can match BraxVmapWrapper
,EvalWrapper
, andEpisodeWrapper
. Obviously not recommended to useAutoResetWrapper
though.