nuplan-devkit icon indicating copy to clipboard operation
nuplan-devkit copied to clipboard

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

Open yaqlee opened this issue 2 years ago • 7 comments

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?

yaqlee avatar Apr 02 '23 16:04 yaqlee

Hi @yaqlee,

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

patk-motional avatar Apr 05 '23 03:04 patk-motional

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?

d451gon avatar Apr 14 '23 17:04 d451gon

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

mh0797 avatar Apr 15 '23 09:04 mh0797

Hi all,

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

patk-motional avatar Apr 17 '23 06:04 patk-motional

Hello,

python run_simulation.py +simulation=closed_loop_reactive_agents enable_simulation_progress_bar=True 

d451gon avatar Apr 17 '23 13:04 d451gon

Can you try installing numpy==1.23.4?

patk-motional avatar Apr 18 '23 09:04 patk-motional

Downgrading numpy from 1.24.2 to 1.23.4 solved it for me.

Thank you!

d451gon avatar Apr 19 '23 10:04 d451gon