Skip to content

Commit 4ae5986

Browse files
authored
(v3.8.4) - Fix Calibration of Normalization bug (#483)
* Fix normalization calibration initialization * Update Sinergym version from 3.8.3 to 3.8.4
1 parent e4ab248 commit 4ae5986

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
package-mode = true
77
name = "sinergym"
88

9-
version = "3.8.3"
9+
version = "3.8.4"
1010
description = "Sinergym provides a Gymnasium-based interface to interact with building simulations. This allows control in simulation time through custom controllers, including reinforcement learning agents"
1111
license = "MIT"
1212

sinergym/utils/wrappers.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,12 @@ def __init__(self,
286286
dtype=self.observation_space.dtype)
287287

288288
# Set mean and variance
289-
self.obs_rms.mean = self._process_metric(
290-
mean, 'mean') or self.obs_rms.mean
291-
self.obs_rms.var = self._process_metric(var, 'var') or self.obs_rms.var
289+
processed_mean = self._process_metric(mean, 'mean')
290+
processed_var = self._process_metric(var, 'var')
291+
if processed_mean is not None:
292+
self.obs_rms.mean = self._process_metric(mean, 'mean')
293+
if processed_var is not None:
294+
self.obs_rms.var = processed_var
292295

293296
self.logger.info('Wrapper initialized.')
294297

sinergym/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.8.3
1+
3.8.4

0 commit comments

Comments
 (0)