Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion stable_baselines3/common/base_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,14 @@ def load( # noqa: C901
print("== CURRENT SYSTEM INFO ==")
get_system_info()

load_path = path
if isinstance(path, str) and path.endswith(".zip"):
load_path = path[:-4]
elif isinstance(path, pathlib.Path) and path.suffix == ".zip":
load_path = pathlib.Path(str(path)[:-4])

data, params, pytorch_variables = load_from_zip_file(
path,
load_path,
device=device,
custom_objects=custom_objects,
print_system_info=print_system_info,
Expand Down