Skip to content

Exported bus / idx columns are positional, not real IDs #100

Description

@albanpuech

local_index_per_graph (tasks/utils.py, added in #87) regenerates per-graph indices from bincount(batch). Both predict_steps export these as the bus and idx identity columns in every parquet — predictions and now embeddings.

These are positions, not IDs. Correctness depends on datakit emitting buses in order and the wrapper's groupby preserving it. If that ever changes, the exported IDs silently mislabel rows.

Buses are at least validated (powergrid_hetero_dataset.py:162 asserts against the real bus column). Generators are not — gen_index is set from the positional DataFrame index (reset_index()), is never stored on the graph, and has no assert. Both spots carry TODOs saying to store real IDs in the tensors.

Fix: carry the true bus/gen IDs as tensor fields from the dataset onward and export those instead of regenerated positions; the ordering assert can then go away.

Refs #87

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions