This PR fix a bug detected in config params for environments.
Motivation and Context
[ ] I have raised an issue to propose this change (required for new features and bug fixes)
Why is this change required? What problem does it solve? Please, reference issue or issues opened previously.
Bug:
When we launch an experiment in which we set a config_params value different from the default (in timesteps_per_hour). Sinergym applies the changes correctly, but they are not well reflected in the environment attributes (timestep_per_episode).
If we set the number of training steps using this attribute and multiplying it by the number of training episodes we want, it turns out that the number of timesteps trained will be in reference to the number of native timesteps per hour and not the new one set for the experiment.
Solution:
Sinergym applied the configuration and adaptation of the building model after the first reset. It was designed that way in order to be able to change the configuration episode by episode.
As it does not seem a useful feature and usually attributes are accessed before they are updated at reset. All the adaptation to the model is done in class constructor and only the essential things such as the EPW adaptation (useful in case of having specified several) are left in the environment reset.
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
This PR fix a bug detected in config params for environments.
Motivation and Context
Why is this change required? What problem does it solve? Please, reference issue or issues opened previously.
Bug:
When we launch an experiment in which we set a
config_params
value different from the default (intimesteps_per_hour
). Sinergym applies the changes correctly, but they are not well reflected in the environment attributes (timestep_per_episode
).If we set the number of training steps using this attribute and multiplying it by the number of training episodes we want, it turns out that the number of timesteps trained will be in reference to the number of native timesteps per hour and not the new one set for the experiment.
Solution:
Sinergym applied the configuration and adaptation of the building model after the first reset. It was designed that way in order to be able to change the configuration episode by episode.
As it does not seem a useful feature and usually attributes are accessed before they are updated at reset. All the adaptation to the model is done in class constructor and only the essential things such as the EPW adaptation (useful in case of having specified several) are left in the environment reset.
Types of changes
Checklist:
autopep8
second level aggressive.isort
.cd docs && make spelling && make html
pass (required if documentation has been updated.)pytest tests/ -vv
pass. (required).pytype -d import-error sinergym/
pass. (required)Changelog: