You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with le l2rpn_wcci_2022 environment and the MultifolderWithCache chronic's class, it appears that the date of the first observation is 01/01/2019 for all the chronics. For this environment, the start date of a chronic can be found in its name and rarely (never) matches 01/01/2019.
Here is the bug : with the MultifolderWithCache chronic's class, the dates of the observations seems wrong.
How to reproduce
The following python code allows to compare the date of the first observation and the date in the chronic's name :
Code snippet
importgrid2opfromgrid2op.ChronicsimportMultifolderWithCacheimportre# Creation of the environmentenv=grid2op.make("l2rpn_wcci_2022",
chronics_class=MultifolderWithCache) # No bug wihout the MultifolderWithCache argument hereenv.chronics_handler.real_data.set_filter(lambdax: re.match(".*2050-02-07_0", x) isnotNone) # We test on a randomly chosen chronic for the exampleenv.chronics_handler.reset()
# Print the datesobs=env.reset()
print("Date of the first observation (yyyy mm dd) :", obs.year, obs.month, obs.day)
print("Chronic name :", env.chronics_handler.get_name())
Current output
The date of the first observation and the date of the chronic's name are differents
Date of the observation (yyyy mm dd) : 2019 1 1
Chronic name : 2050-02-07_0
Expected output
The date of the first observation schould match the date of the chronic's name
Date of the observation (yyyy mm dd) : 2050 2 7
Chronic name : 2050-02-07_0
from grid2op.Chronics import GridStateFromFileWithForecasts
class MyGridStateFromFileWithForecasts(GridStateFromFileWithForecasts):
""" This class fixes a bug that the current chronix datatime is fixed to start at datetime(year=2019, month=1, day=1)
"""
def next_chronics(self):
self.current_datetime = self.start_datetime
self.current_index = -1
self.curr_iter = 0
Environment
1.7.2
Ubuntu 20.04.3 LTS
Bug description
When working with le
l2rpn_wcci_2022
environment and theMultifolderWithCache
chronic's class, it appears that the date of the first observation is 01/01/2019 for all the chronics. For this environment, the start date of a chronic can be found in its name and rarely (never) matches 01/01/2019.Here is the bug : with the
MultifolderWithCache
chronic's class, the dates of the observations seems wrong.How to reproduce
The following python code allows to compare the date of the first observation and the date in the chronic's name :
Code snippet
Current output
The date of the first observation and the date of the chronic's name are differents
Expected output
The date of the first observation schould match the date of the chronic's name
Maybe an interesting clue
The date 01/01/2019 matches the default
start_datetime
argument in thegrid2op.Chronics.MultifolderWithCache
class :https://grid2op.readthedocs.io/en/latest/chronics.html#grid2op.Chronics.MultifolderWithCache
The text was updated successfully, but these errors were encountered: