You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing Python training or inference, because of the conversion, the value for action "1" will be sent to action "2" instead.
When doing onnx inference, the actions will have the same order as defined in the action space method, which means there will be a mismatch when trying to run onnx inference in any env where the action names are not ordered alphabetically.
I ran into this issue in one of my experiments, and was able to solve it by changing the order of actions as defined to be alphabetic.
The same issue happens when trying to run inference on e.g. FlyBy where the actions are not ordered alphabetically.
The text was updated successfully, but these errors were encountered:
Ivan-267
changed the title
Bug: Action names must be alphabetically ordered for ONNX inference to work.
Action names must be alphabetically ordered for ONNX inference to work.
Nov 28, 2023
This was checked with Godot_v4.2-rc2_mono_win64.
Issue:
When defining the action space, action names need to be defined in alphabetic order, e.g.
Otherwise the action space order sent to Python by the sync node will be different (it seems to be sorted alphabetically) after the dictionary goes through the
JSON.stringify
method: https://github.com/edbeeching/godot_rl_agents_plugin/blob/main/addons/godot_rl_agents/sync.gd#L178So if e.g. the order defined in Godot is:
When doing Python training or inference, because of the conversion, the value for action "1" will be sent to action "2" instead.
When doing onnx inference, the actions will have the same order as defined in the action space method, which means there will be a mismatch when trying to run onnx inference in any env where the action names are not ordered alphabetically.
I ran into this issue in one of my experiments, and was able to solve it by changing the order of actions as defined to be alphabetic.
The same issue happens when trying to run inference on e.g.
FlyBy
where the actions are not ordered alphabetically.The text was updated successfully, but these errors were encountered: