Skip to content

Commit a1eaf2e

Browse files
committed
Use default_factory instead of default for BufferDTypes.dict_obs
1 parent 6658f2b commit a1eaf2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stable_baselines3/common/buffers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class BufferDTypes:
4141
observations: InitVar[Union[DTypeLike, Mapping[str, DTypeLike]]]
4242
actions: InitVar[DTypeLike]
4343

44-
dict_obs: MappingProxyType[str, np.dtype] = field(default=MappingProxyType({}), init=False)
44+
dict_obs: MappingProxyType[str, np.dtype] = field(default_factory=lambda: MappingProxyType({}), init=False)
4545
obs: Optional[np.dtype] = field(default=None, init=False)
4646
act: Optional[np.dtype] = field(default=None, init=False)
4747

0 commit comments

Comments
 (0)