Skip to content

Commit

Permalink
Update stable_baselines3_example.py
Browse files Browse the repository at this point in the history
Sets to use the new onnx export method with support for SAC and PPO.
  • Loading branch information
Ivan-267 authored Aug 22, 2024
1 parent 1f8b277 commit 7806f26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/stable_baselines3_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from stable_baselines3.common.vec_env.vec_monitor import VecMonitor

from godot_rl.core.utils import can_import
from godot_rl.wrappers.onnx.stable_baselines_export import export_ppo_model_as_onnx
from godot_rl.wrappers.onnx.stable_baselines_export import export_model_as_onnx
from godot_rl.wrappers.stable_baselines_wrapper import StableBaselinesGodotEnv

# To download the env source and binary:
Expand Down Expand Up @@ -115,7 +115,7 @@ def handle_onnx_export():
if args.onnx_export_path is not None:
path_onnx = pathlib.Path(args.onnx_export_path).with_suffix(".onnx")
print("Exporting onnx to: " + os.path.abspath(path_onnx))
export_ppo_model_as_onnx(model, str(path_onnx))
export_model_as_onnx(model, str(path_onnx), True)


def handle_model_save():
Expand Down

0 comments on commit 7806f26

Please sign in to comment.