Factory Helpers¶
Internal factory utilities used to construct wrappers with consistent type inference.
envrax.wrappers.base._WrapperFactory
¶
Deferred wrapper returned by Wrapper.__new__ when called without an env.
Calling the factory with an env creates the intended wrapper with the
pre-bound keyword arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cls
|
type
|
Concrete |
required |
**kwargs
|
Keyword arguments forwarded to |
required |
Source code in envrax/wrappers/base.py
| Python | |
|---|---|
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
__call__(env)
¶
Wrap env using the stored class and keyword arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env
|
JaxEnv
|
Environment to wrap. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
wrapper |
Wrapper
|
Configured wrapper instance. |
Source code in envrax/wrappers/base.py
| Python | |
|---|---|
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |