Skip to content

ValueError: zero-size array to reduction operation maximum which has no identity #23

@beizhengren

Description

@beizhengren

Thanks for the sharing.

When I run the simulation command as
sh ./script/run_pluto_planner.sh pluto_planner nuplan_mini mini_demo_scenario last.ckpt new_output
the following error occurs:
ValueError: zero-size array to reduction operation maximum which has no identity

The detail of the error:

----------- Simulation failed: with the following trace:
Sequential:   0%|                                                                                             | 0/1 [00:47<?, ?it/s]Traceback (most recent call last):
  File "/home/wyz/workspace/learning/planing/nuplan-devkit/nuplan/planning/simulation/runner/executor.py", line 27, in run_simulation
    return sim_runner.run()
  File "/home/wyz/workspace/learning/planing/nuplan-devkit/nuplan/planning/simulation/runner/simulations_runner.py", line 113, in run
    trajectory = self.planner.compute_trajectory(planner_input)
  File "/home/wyz/workspace/learning/planing/nuplan-devkit/nuplan/planning/simulation/planner/abstract_planner.py", line 108, in compute_trajectory
    raise e
  File "/home/wyz/workspace/learning/planing/nuplan-devkit/nuplan/planning/simulation/planner/abstract_planner.py", line 105, in compute_trajectory
    trajectory = self.compute_planner_trajectory(current_input)
  File "/home/wyz/workspace/learning/planing/pluto/src/planners/pluto_planner.py", line 166, in compute_planner_trajectory
    planning_trajectory = self._run_planning_once(current_input)
  File "/home/wyz/workspace/learning/planing/pluto/src/planners/pluto_planner.py", line 200, in _run_planning_once
    candidate_trajectories, learning_based_score = self._trim_candidates(
  File "/home/wyz/workspace/learning/planing/pluto/src/planners/pluto_planner.py", line 286, in _trim_candidates
    sorted_probability = softmax(sorted_probability)
  File "/home/wyz/anaconda3/envs/pluto/lib/python3.9/site-packages/scipy/special/_logsumexp.py", line 232, in softmax
    x_max = np.amax(x, axis=axis, keepdims=True)
  File "/home/wyz/anaconda3/envs/pluto/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 2827, in amax
    return _wrapreduction(a, np.maximum, 'max', axis, None, out,
  File "/home/wyz/anaconda3/envs/pluto/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 88, in _wrapreduction
    return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation maximum which has no identity
2024-12-10 22:03:06,974 WARNING {/home/wyz/workspace/learning/planing/nuplan-devkit/nuplan/planning/simulation/runner/executor.py:34}  Simulation failed with error:
 zero-size array to reduction operation maximum which has no identity
2024-12-10 22:03:06,974 WARNING {/home/wyz/workspace/learning/planing/nuplan-devkit/nuplan/planning/simulation/runner/executor.py:38}  
Failed simulation [log,token]:
 [2021.08.17.16.57.11_veh-08_01200_01636, 9e30155b8bb55fd9]

Here is my local dir
image
What is causing this problem, and how should it be resolved?
Thanks all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions