Skip to content

Commit 898884a

Browse files
committed
Add test for saving/loading after JIT
1 parent 1697fb9 commit 898884a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_save_load.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ def test_save_load(tmp_path, model_class):
167167

168168
del model
169169

170+
# Check that loading after compiling works, see GH#2137
171+
model = model_class.load(tmp_path / "test_save.zip")
172+
model.policy = th.compile(model.policy)
173+
model.save(tmp_path / "test_save.zip")
174+
model_class.load(tmp_path / "test_save.zip")
175+
170176
# clear file from os
171177
os.remove(tmp_path / "test_save.zip")
172178

0 commit comments

Comments
 (0)