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
In the _get_info method of the BoxGymObsSpace class, the attribute _template_obj of the grid2op observation space is used to check the bounds indicated in the argument functs.
But on my computer, most of the attributes of _template_obj contain absurd values (wrong order of magnitude or wrong sign). This is problematic because if you compute an attribute entered in functs from an observation with absurd values, you obtain absurd values for the computed attribute that may not respect the bounds indicated in functs and it may result in an error.
How to reproduce
In this code, I compare the attributes of the _template_obj observation to the bounds indicated in BoxGymObsSpace._dict_properties that seem to be adequate (I only check attributes that have at least one finite bound).
I do it for 50 instances of environment, because the _template_obj observation randomly changes.
I print the attributes whose bounds have not been respected and attributes whose bounds have never been exceeded.
The time_next_maintenance attribute is out of the bounds with index 0. Bounds : -1 <= 2147483647, value: -615714592.
The curtailment_limit_mw attribute is out of the bounds with index 0. Bounds : 0.0 <= 130.0, value: -7.498466991292809e+18.
The theta_ex attribute is out of the bounds with index 0. Bounds : -180.0 <= 180.0, value: -5.768051743208243e+16.
The curtailment_limit_effective attribute is out of the bounds with index 0. Bounds : 0.0 <= 1.0, value: -5.768051743208243e+16.
The load_theta attribute is out of the bounds with index 0. Bounds : -180.0 <= 180.0, value: 6.967259498760739e+19.
The v_or attribute is out of the bounds with index 4. Bounds : 0.0 <= inf, value: -2.6917968793305088e+17.
The prod_v attribute is out of the bounds with index 0. Bounds : 0.0 <= inf, value: -5.768161694371021e+16.
The topo_vect attribute is out of the bounds with index 0. Bounds : -1 <= 2, value: -615714176.
The gen_margin_down attribute is out of the bounds with index 0. Bounds : 0.0 <= 0.0, value: -5.768189182161715e+16.
The curtailment_mw attribute is out of the bounds with index 0. Bounds : 0.0 <= 130.0, value: -7.498466991292809e+18.
The target_dispatch attribute is out of the bounds with index 0. Bounds : -130.0 <= 130.0, value: -5.768051743208243e+16.
The storage_power_target attribute is out of the bounds with index 0. Bounds : -12.0 <= 12.0, value: 1.0434096265290193e+36.
The a_or attribute is out of the bounds with index 4. Bounds : 0.0 <= inf, value: -2.6924524631385702e+17.
The curtailment_limit attribute is out of the bounds with index 0. Bounds : 0.0 <= 1.0, value: -5.768051743208243e+16.
The storage_theta attribute is out of the bounds with index 0. Bounds : -180.0 <= 180.0, value: 1.0411552683928384e+36.
The total_number_of_alert attribute is out of the bounds with index 0. Bounds : -1 <= 2147483647, value: -615715808.
The gen_p_before_curtail attribute is out of the bounds with index 0. Bounds : -3156.010009765625 <= 3286.010009765625, value: -5.768051743208243e+16.
The gen_v attribute is out of the bounds with index 0. Bounds : 0.0 <= inf, value: -5.768161694371021e+16.
The gen_theta attribute is out of the bounds with index 0. Bounds : -180.0 <= 180.0, value: -5.768051743208243e+16.
The gen_margin_up attribute is out of the bounds with index 0. Bounds : 0.0 <= 0.0, value: -5.768161694371021e+16.
The theta_or attribute is out of the bounds with index 0. Bounds : -180.0 <= 180.0, value: -5.768051743208243e+16.
The attack_under_alert attribute is out of the bounds with index 0. Bounds : -1 <= 1, value: 106.
The curtailment attribute is out of the bounds with index 0. Bounds : 0.0 <= 1.0, value: -5.768051743208243e+16.
The attention_budget attribute is out of the bounds with index 0. Bounds : -1.0 <= inf, value: -171.52000427246094.
The actual_dispatch attribute is out of the bounds with index 0. Bounds : -130.0 <= 130.0, value: -5.768051743208243e+16.
The a_ex attribute is out of the bounds with index 0. Bounds : 0.0 <= inf, value: -5.768539651493069e+16.
The rho attribute is out of the bounds with index 0. Bounds : 0.0 <= inf, value: -5.768051743208243e+16.
The storage_power attribute is out of the bounds with index 0. Bounds : -12.0 <= 12.0, value: 2.783533808643751e+36.
The duration_next_maintenance attribute is out of the bounds with index 0. Bounds : 0 <= 2147483647, value: -615714592.
The was_alert_used_after_attack attribute is out of the bounds with index 0. Bounds : -1 <= 1, value: 2068385739.
The v_ex attribute is out of the bounds with index 0. Bounds : 0.0 <= inf, value: -5.76848467591168e+16.
The thermal_limit attribute is out of the bounds with index 0. Bounds : 0.0 <= inf, value: -5.768725194080256e+16.
The time_before_cooldown_line attribute is out of the bounds with index 0. Bounds : 0 <= 2147483647, value: -615714592.
The time_since_last_attack attribute is out of the bounds with index 4. Bounds : -1 <= 2147483647, value: -795569856.
The alert_duration attribute is out of the bounds with index 4. Bounds : -1 <= 2147483647, value: -16513.
Attributes with a problem: {'time_next_maintenance', 'curtailment_limit_mw', 'theta_ex', 'curtailment_limit_effective', 'load_theta', 'v_or', 'prod_v', 'topo_vect', 'gen_margin_down', 'curtailment_mw', 'target_dispatch', 'a_or', 'time_before_cooldown_line', 'curtailment_limit', 'time_since_last_attack', 'storage_theta', 'total_number_of_alert', 'gen_p_before_curtail', 'gen_v', 'gen_theta', 'gen_margin_up', 'theta_or', 'attack_under_alert', 'curtailment', 'attention_budget', 'actual_dispatch', 'a_ex', 'rho', 'storage_power', 'duration_next_maintenance', 'alert_duration', 'was_alert_used_after_attack', 'v_ex', 'thermal_limit', 'storage_power_target'}
Attributes without a problem: {'time_since_last_alert', 'minute_of_hour', 'last_alarm', 'prod_p', 'day', 'max_step', 'month', 'time_since_last_alarm', 'current_step', 'time_before_cooldown_sub', 'year', 'q_or', 'load_q', 'gen_p', 'p_or', 'hour_of_day', 'day_of_week', 'load_v', 'q_ex', 'delta_time', 'load_p', 'p_ex', 'storage_charge', 'timestep_overflow'}
Note : I also noticed absurd values for time_since_last_alert and time_since_last_alarm with manual tests even if they don't appear here. The code I propose to test attributes stays a randow way to do it.
Environment
1.10.5
3.12.1
ubuntu
Bug description
In the
_get_info
method of theBoxGymObsSpace
class, the attribute_template_obj
of the grid2op observation space is used to check the bounds indicated in the argumentfuncts
.But on my computer, most of the attributes of
_template_obj
contain absurd values (wrong order of magnitude or wrong sign). This is problematic because if you compute an attribute entered infuncts
from an observation with absurd values, you obtain absurd values for the computed attribute that may not respect the bounds indicated infuncts
and it may result in an error.How to reproduce
In this code, I compare the attributes of the
_template_obj
observation to the bounds indicated inBoxGymObsSpace._dict_properties
that seem to be adequate (I only check attributes that have at least one finite bound).I do it for 50 instances of environment, because the
_template_obj
observation randomly changes.I print the attributes whose bounds have not been respected and attributes whose bounds have never been exceeded.
Current output
Note : I also noticed absurd values for
time_since_last_alert
andtime_since_last_alarm
with manual tests even if they don't appear here. The code I propose to test attributes stays a randow way to do it.Expected output
The text was updated successfully, but these errors were encountered: