Grid2Op icon indicating copy to clipboard operation
Grid2Op copied to clipboard

'h_forecast' bug when creating env without forecast for l2rpn_idf_2023

Open marota opened this issue 11 months ago • 3 comments

Environment

  • Grid2op version: 1.9.8
  • System: ubuntu20.04, ...

Bug description

When loading the environemnt l2rpn_idf_2023 without forecast, this error is returned:

TypeError: init() got an unexpected keyword argument 'h_forecast'

How to reproduce

Code snippet

import grid2op
from grid2op.Chronics import GridStateFromFile

env = grid2op.make("l2rpn_idf_2023",
                   data_feeding_kwargs={"gridvalueClass": GridStateFromFile})

Current output

TypeError: __init__() got an unexpected keyword argument 'h_forecast'

Expected output

No error should be returned, and the h_forecast parameter should be disregarded in this case when not considering forecasts.

marota avatar Mar 13 '24 11:03 marota

To deactivate the forecast you can also do : youhttps://grid2op.readthedocs.io/en/latest/environment.html#grid2op.Environment.BaseEnv.deactivate_forecast

(and I'll fix this ASAP)

BDonnot avatar Mar 13 '24 15:03 BDonnot

That's indeed a workaround I was thinking about, I can confirm it to IRT now, thanks!

marota avatar Mar 14 '24 10:03 marota

Ideally both should be done for maximum performance. I'll work on the fix asap

BDonnot avatar Mar 14 '24 10:03 BDonnot

Fixed in 1.10.1 :-)

BDonnot avatar Mar 18 '24 11:03 BDonnot