mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-09-15 22:10:25 +00:00
* Fix observation buffer dtype in DictReplayBuffer * Formatting fix (line length) * Changelog update, bugfix DictReplaybuffer observations dtype
This commit is contained in:
parent
b52c6fc18f
commit
066e1409d9
2 changed files with 6 additions and 2 deletions
|
|
@ -59,6 +59,7 @@ Bug Fixes:
|
|||
- Fixed loading of ``ent_coef`` for ``SAC`` and ``TQC``, it was not optimized anymore (thanks @Atlis)
|
||||
- Fixed saving of ``A2C`` and ``PPO`` policy when using gSDE (thanks @liusida)
|
||||
- Fixed a bug where no output would be shown even if ``verbose>=1`` after passing ``verbose=0`` once
|
||||
- Fixed observation buffers dtype in DictReplayBuffer (@c-rizz)
|
||||
|
||||
Deprecations:
|
||||
^^^^^^^^^^^^^
|
||||
|
|
@ -706,3 +707,4 @@ And all the contributors:
|
|||
@diditforlulz273 @liorcohen5 @ManifoldFR @mloo3 @SwamyDev @wmmc88 @megan-klaiber @thisray
|
||||
@tfederico @hn2 @LucasAlegre @AptX395 @zampanteymedio @JadenTravnik @decodyng @ardabbour @lorenz-h @mschweizer @lorepieri8 @vwxyzjn
|
||||
@ShangqunYu @PierreExeter @JacopoPan @ltbd78 @tom-doerr @Atlis @liusida @09tangriro @amy12xx @juancroldan @benblack769 @bstee615
|
||||
@c-rizz
|
||||
|
|
|
|||
|
|
@ -504,10 +504,12 @@ class DictReplayBuffer(ReplayBuffer):
|
|||
self.optimize_memory_usage = optimize_memory_usage
|
||||
|
||||
self.observations = {
|
||||
key: np.zeros((self.buffer_size, self.n_envs) + _obs_shape) for key, _obs_shape in self.obs_shape.items()
|
||||
key: np.zeros((self.buffer_size, self.n_envs) + _obs_shape, dtype=observation_space[key].dtype)
|
||||
for key, _obs_shape in self.obs_shape.items()
|
||||
}
|
||||
self.next_observations = {
|
||||
key: np.zeros((self.buffer_size, self.n_envs) + _obs_shape) for key, _obs_shape in self.obs_shape.items()
|
||||
key: np.zeros((self.buffer_size, self.n_envs) + _obs_shape, dtype=observation_space[key].dtype)
|
||||
for key, _obs_shape in self.obs_shape.items()
|
||||
}
|
||||
|
||||
# only 1 env is supported
|
||||
|
|
|
|||
Loading…
Reference in a new issue