-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with obs_colored.prod_p in grid2viz manager.py #92
Comments
Hi Frank, The prod_p attribute was actually renamed gen_p in Grid2Op 1.5.1. obs_colored.prod_p = np.array(max_gens.value) has been replaced by : obs_colored.gen_p = np.array(max_gens.value) on branch grid2op-1.5 but has not been merged into the master yet. Thanks for spotting it. Cheers |
Just to be clear on that, |
Hi, I am getting this error too: |
Thanks for clarifying the issue. Attribute of the observation should be immutable. Only the environment can generate an observation, then no one should be able to modify it. Apparently, grid2viz does that for some attributes (in this case |
When using the most recent grid2op (1.5.1), some observation attributes have become private. This will cause errors in the grid2viz manager.py program when executing:
obs_colored.load_p = np.array(max_loads.value)
obs_colored.prod_p = np.array(max_gens.value)
because load_p and prod_p are now private attributes.
Hence, Python will complain that these attributes cannot be set and grid2viz does not load its main windows when selecting a scenario.
It can easily be fixed by adjusting the manager.py to:
obs_colored._load_p = np.array(max_loads.value)
obs_colored._prod_p = np.array(max_gens.value)
(just add underscores _ in front of load_p and prod_p)
The text was updated successfully, but these errors were encountered: