motional / nuplan-devkit

The devkit of the nuPlan dataset.
https://www.nuplan.org
Other
673 stars 129 forks source link

A RUNTIMEWARNING message always happen when run training, without interrupting the training process #254

Open yaqlee opened 1 year ago

yaqlee commented 1 year ago

It seems that it did not affect or interrupt the training process, but it looks too much: /root/code/nuplan-devkit/nuplan/common/maps/nuplan_map/utils.py:413: RuntimeWarning: invalid value encountered in cast return elements.iloc[np.where(elements[column_label].to_numpy().astype(int) == int(desired_value))]

how can I clean them on std out when training?

patk-motional commented 1 year ago

Hi @yaqlee,

Can you help elaborate? I'm not sure what you mean by "clean them on std out when training?"

d451gon commented 1 year ago

This happens when converting the array to int because there are nans in the array. Just running a single log simulation in closed loop outputs thousands of this RuntimeWarning. He is probably asking how to suppress the warning so that it doesn't pollute the log/console output. An option would be to remove the nans from the array before the int conversion.

@patk-motional : any idea why this is happening?

mh0797 commented 1 year ago

Hi, this warning seems to appear since the devkit version v1.1. @yaqlee: As it does not interrupt the training and does not cause nans in the features, it seems to be safe to just add

import warnings
warnings.filterwarnings(action="ignore", message="(.|\n)*invalid value encountered in cast")

in here.

@patk-motional: Nonethelses, it would be helpful if you could clarify why this warning occurs and confirm if it is safe to ignore/filter this warning

patk-motional commented 1 year ago

Hi all,

Can you share the simulation command so that we can recreate this issue?

d451gon commented 1 year ago

Hello,

python run_simulation.py +simulation=closed_loop_reactive_agents enable_simulation_progress_bar=True 
patk-motional commented 1 year ago

Can you try installing numpy==1.23.4?

d451gon commented 1 year ago

Downgrading numpy from 1.24.2 to 1.23.4 solved it for me.

Thank you!