Closed DEUCE1957 closed 5 months ago
Two-line reproducible error:
import grid2op; import lightsim2grid
grid2op.make("rte_case14_realistic", backend=lightsim2grid.LightSimBackend()).copy().backend._missing_two_busbars_support_info
It appears to be caused by copy not copying over the '._missing_two_busbars_support_info' attribute of the Backend.
Quick Fix: Add Line after Line No 1077 in Grid2Op's environement.py class:
new_obj._raw_backend_class._missing_two_busbars_support_info = self.backend._missing_two_busbars_support_info
Tried playing around with copy.deepcopy on the 'self._raw_backend_class' but that did not fix the issue.
Hello,
Indeed this is a bug due to a misuse of deep copy in lightsim2grid.
I wrote a post here https://discord.com/channels/698080905209577513/698133564381724764/1217514511284830259
In the mean time you can use grid2op 1.9.8.
Sorry for that and that for proposing a fix grid2op side (I'll implement one and this sounds reasonable)
Hello,
This should be fixed by upgrade to latest lightsim2grid version:
pip install LightSim2Grid==0.7.5.post1
Fix grid2op will follow most likely tomorrow, today i'll work on backporting this fix for other lightsim2grid version
Fixed in lightsim2grid and grid2op now.
You simply need to upgrade either (lightsim2grid or grid2op) but preferably both.
Environment
1.10.0
Windows 11
3.11.3
Bug description
When using the LightSim2Grid backend the attribute '_missing_two_busbars_support_info' is False since LightSim2Grid currently does not support more than 2 busbars per substation. Normally, this only results in a warning. However, when using the train() method from l2rpn_baselines, it seems this attribute is lost somewhere. As a result when backend.assert_grid_correct() is run an attribute error is thrown: 'LightSimBackend_rte_case14_realistic_train' object has no attribute '_missing_two_busbars_support_info'
How to reproduce
Error Trace