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

[Feature] Jumanji from_pixels=True #2129

Merged
merged 9 commits into from
Apr 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint
  • Loading branch information
vmoens committed Apr 29, 2024
commit 46c0ce16f4fda4d0901f395f2fec78796f6bd347
5 changes: 4 additions & 1 deletion torchrl/envs/libs/jumanji.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,13 +541,16 @@ def render(
import jax
import jax.numpy as jnp
import jumanji

try:
import matplotlib
import matplotlib.pyplot as plt
import PIL
import torchvision.transforms.v2.functional
except ImportError as err:
raise ImportError("Rendering with Jumanji requires torchvision, matplotlib and PIL to be installed.") from err
raise ImportError(
"Rendering with Jumanji requires torchvision, matplotlib and PIL to be installed."
) from err

if matplotlib_backend is not None:
matplotlib.use(matplotlib_backend)
Expand Down
Loading