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

Problems with Pytorch Env #311

Open
Leonardodeheinz opened this issue Dec 14, 2024 · 0 comments
Open

Problems with Pytorch Env #311

Leonardodeheinz opened this issue Dec 14, 2024 · 0 comments
Assignees

Comments

@Leonardodeheinz
Copy link

Hello,

i am trying to get this repo to run on my local macbook (m3). I have installed all the neccessary software to get it running. But some questions remain open. Since macos does not really cuda support anymore i wonder if it is essential to get the simulation working. Because encounter to this problem in your tutorial notebook number 3.

The code:

env = GPUDriveTorchEnv(
config=env_config,
scene_config=scene_config,
render_config=render_config,
max_cont_agents=MAX_NUM_OBJECTS, # Maximum number of agents to control per scenario
device=device,
)

the Error :


AssertionError Traceback (most recent call last)
Cell In[6], line 2
1 # MAKE ENV
----> 2 env = GPUDriveTorchEnv(
3 config=env_config,
4 scene_config=scene_config,
5 render_config=render_config,
6 max_cont_agents=MAX_NUM_OBJECTS, # Maximum number of agents to control per scenario
7 device=device,
8 )

File ~/Documents/studium/deep_rl/gpu_drive_project/Deep_RL_Project/gpudrive/pygpudrive/env/env_torch.py:61, in GPUDriveTorchEnv.init(self, config, scene_config, max_cont_agents, device, action_type, render_config, backend)
55 self.num_valid_controlled_agents_across_worlds = (
56 self.cont_agent_mask.sum().item()
57 )
59 # Setup action and observation spaces
60 self.observation_space = Box(
---> 61 low=-np.inf, high=np.inf, shape=(self.get_obs().shape[-1],)
62 )
63 self._setup_action_space(action_type)
64 self.info_dim = 5 # Number of info features

File ~/Documents/studium/deep_rl/gpu_drive_project/Deep_RL_Project/gpudrive/pygpudrive/env/env_torch.py:400, in GPUDriveTorchEnv.get_obs(self)
393 def get_obs(self):
...
312 raise AssertionError(
313 "libcudart functions unavailable. It looks like you have a broken build?"
314 )

AssertionError: Torch not compiled with CUDA enabled

The tests that you provided through "pytest" works without any problem. I will try to get it working on a ubuntu workstation with an nvida card next week anyway at my university, since I need for training anyway for my course project.

Best regards

@daphnecor daphnecor self-assigned this Dec 15, 2024
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

No branches or pull requests

2 participants