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

RuntimeError in closed_loop_nonreactive_agents/ closed_loop_reactive_agents evaluation. #33

Open
sgNicola opened this issue Dec 30, 2024 · 1 comment

Comments

@sgNicola
Copy link

When I run the evaluation script for the downloaded plantf.ckpt: sh ./script/plantf_benchmarks.sh val14 , there will be runtime error for closed_loop evaluation:

'2024-12-30 13:54:45,283 WARNING {/home/sgwang/nuplan-devkit/nuplan/planning/simulation/runner/executor.py:123} Failed Simulation.
'Traceback (most recent call last):
File "/home/sgwang/nuplan-devkit/nuplan/planning/simulation/runner/executor.py", line 27, in run_simulation
return sim_runner.run()
File "/home/sgwang/nuplan-devkit/nuplan/planning/simulation/runner/simulations_runner.py", line 113, in run
trajectory = self.planner.compute_trajectory(planner_input)
File "/home/sgwang/nuplan-devkit/nuplan/planning/simulation/planner/abstract_planner.py", line 108, in compute_trajectory
raise e
File "/home/sgwang/nuplan-devkit/nuplan/planning/simulation/planner/abstract_planner.py", line 105, in compute_trajectory
trajectory = self.compute_planner_trajectory(current_input)
File "/home/sgwang/planTF/src/planners/imitation_planner.py", line 116, in compute_planner_trajectory
local_trajectory = self._planning(current_input)
File "/home/sgwang/planTF/src/planners/imitation_planner.py", line 101, in _planning
out = self._planner.forward(planner_feature_torch.data)
File "/home/sgwang/planTF/src/models/planTF/planning_model.py", line 117, in forward
x_polygon = self.map_encoder(data)
File "/home/sgwang/data/tmp/envs/plantf/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/sgwang/planTF/src/models/planTF/modules/map_encoder.py", line 57, in forward
x_polygon = self.polygon_encoder(polygon_feature, valid_mask).view(bs, M, -1)
RuntimeError: cannot reshape tensor of 0 elements into shape [1, 0, -1] because the unspecified dimension size -1 can be any value and is ambiguous'

However, it does not occur in open loop boxes.

@sgNicola
Copy link
Author

I tried to log the polygon_feature.shape and found out that it was polygon_feature shape: torch.Size([0, 20, 6]) after several frames. But when I tested the evaluation on another machine, this RuntimeError did not occur again.

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

1 participant