Skip to content

Add voltage angles to observation vector - #770

Open
Gaurav890 wants to merge 1 commit into
Grid2op:dev_1.12.6from
Gaurav890:codex/fix-observation-theta-vector
Open

Add voltage angles to observation vector#770
Gaurav890 wants to merge 1 commit into
Grid2op:dev_1.12.6from
Gaurav890:codex/fix-observation-theta-vector

Conversation

@Gaurav890

Copy link
Copy Markdown

Summary

  • add theta_or, theta_ex, load_theta, gen_theta, and storage_theta to the complete observation vector
  • append the angle fields so existing observation-vector offsets remain unchanged
  • preserve the pre-1.12.6 vector layout when loading older serialized observations
  • document the unsupported-backend zero convention and update regression expectations

Why

Voltage-angle attributes were only present in attr_list_json, so to_vect() omitted them and from_vect() could not reconstruct them. Backends that do not expose voltage angles remain supported: Grid2Op already fills these arrays with zeros and reports their availability through support_theta.

Fixes #711.

Validation

  • python -m unittest grid2op.tests.test_Observation — 83 passed, 1 skipped
  • python -m unittest grid2op.tests.test_attached_envs_compat — 26 passed
  • python -m unittest grid2op.tests.test_Runner — 19 passed
  • python -m unittest grid2op.tests.test_GymConverter — 20 passed
  • focused attached-environment observation-size tests — 4 passed
  • pre-commit secret scan and mailmap check — passed

Signed-off-by: gaurav890 <gauravchaulagain0@gmail.com>
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@Gaurav890
Gaurav890 marked this pull request as ready for review August 13, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant