Shortcuts

gym_backend

torchrl.envs.gym_backend(submodule=None)[source]

Returns the gym backend, or a sumbodule of it.

Parameters:

submodule (str) – the submodule to import. If None, the backend itself is returned.

Examples

>>> import mo_gymnasium
>>> with set_gym_backend("gym"):
...     wrappers = gym_backend('wrappers')
...     print(wrappers)
>>> with set_gym_backend("gymnasium"):
...     wrappers = gym_backend('wrappers')
...     print(wrappers)

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources