mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-05-28 22:56:53 +00:00
Fix allowed types for save util (#1693)
This commit is contained in:
parent
f4c5b1e5e2
commit
b85fa7533e
1 changed files with 1 additions and 1 deletions
|
|
@ -205,7 +205,7 @@ def open_path(
|
|||
"""
|
||||
# Note(antonin): the true annotation should be IO[bytes]
|
||||
# but there is not easy way to check that
|
||||
allowed_types = (io.BufferedWriter, io.BufferedReader, io.BytesIO)
|
||||
allowed_types = (io.BufferedWriter, io.BufferedReader, io.BytesIO, io.BufferedRandom)
|
||||
if not isinstance(path, allowed_types):
|
||||
raise TypeError(f"Path {path} parameter has invalid type: expected one of {allowed_types}.")
|
||||
if path.closed:
|
||||
|
|
|
|||
Loading…
Reference in a new issue