Skip to content

Commit

Permalink
Merge pull request #159 from edbeeching/fix-action-names-must-be-alph…
Browse files Browse the repository at this point in the history
…abetically-ordered-for-onnx-inference-to-work

Fix inference when action names are not alphabetic
  • Loading branch information
Ivan-267 authored Dec 4, 2023
2 parents ac7241b + c1dab7e commit 8227583
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion godot_rl/core/godot_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from typing import Optional
from godot_rl.core.utils import ActionSpaceProcessor, convert_macos_path

from collections import OrderedDict

class GodotEnv:
MAJOR_VERSION = "0" # Versioning for the environment
Expand Down Expand Up @@ -319,7 +320,7 @@ def _get_env_info(self):

# actions can be "single" for a single action head
# or "multi" for several outputeads
action_spaces = {}
action_spaces = OrderedDict()
print("action space", json_dict["action_space"])
for k, v in json_dict["action_space"].items():
if v["action_type"] == "discrete":
Expand Down

0 comments on commit 8227583

Please sign in to comment.