Log Slurm topology node lists as a single nodes_csv column (#177) - #177
Conversation
|
@mitthu has exported this pull request. If you are a Meta employee, you can view the originating Diff in D118152543. |
CI CommandsThe following CI workflows run automatically on every push and pull request:
The following commands can be used by maintainers to trigger additional tests that require access to secrets:
|
luccabb
left a comment
There was a problem hiding this comment.
this is good, we should maybe patch creation at some point: https://github.com/facebookresearch/gcm/blob/main/gcm/monitoring/dataclass_utils.py#L103
| # Comma-separated form of `Nodes`. Sinks flatten list fields into one | ||
| # indexed column per element (`Nodes.0`, `Nodes.1`, ...), which makes the | ||
| # node list unusable as a single value in Scuba. This keeps it queryable. |
There was a problem hiding this comment.
| # Comma-separated form of `Nodes`. Sinks flatten list fields into one | |
| # indexed column per element (`Nodes.0`, `Nodes.1`, ...), which makes the | |
| # node list unusable as a single value in Scuba. This keeps it queryable. |
There was a problem hiding this comment.
Updated to just flatten the source list instead of adding the nodes_csv column.
nodes_csv columnnodes_csv column (#177)
…kresearch#177) Summary: `ScontrolTopology.Nodes` is a `list[str]`, and the sinks flatten list fields into one indexed attribute per element (`flatten_dict_factory` in `monitoring/dataclass_utils.py`, used by `exporters/otel.py`). In Scuba that turns a single node list into 1182 separate `Normals` columns, `Nodes.0` through `Nodes.1181` — with no array left to `IMPLODE`, and a new column minted every time a switch grows. Getting the node list back as one value today requires a derived column that enumerates every index: ``` IMPLODE(',', REGEXP_REMOVE_ARRAY(ARRAY(`Nodes.0`, ..., `Nodes.1181`), '^$')) ``` That is ~15KB of SQL, reads 1182 columns per row, and silently truncates the moment a node list outgrows the highest column that exists. This adds a `nodes_csv` field alongside `Nodes` holding the comma-joined list, which lands as a single `Normals` column — groupable and filterable with `substr`/regex, no derived column needed. `Nodes` is kept as-is so the per-element columns remain available and ordering is preserved (a tagset would dedupe and reorder, which would break the topology-aware job debugging use case in T275974051). Empty node lists (e.g. `SwitchName=data-transfer Nodes=`) leave `nodes_csv` unset rather than emitting an empty string, matching how the other optional fields behave. Differential Revision: D118152543
852830c to
2332832
Compare
…kresearch#177) Summary: `ScontrolTopology.Nodes` is a `list[str]`, and the sinks flatten list fields into one indexed attribute per element (`flatten_dict_factory` in `monitoring/dataclass_utils.py`, used by `exporters/otel.py`). In Scuba that turns a single node list into 1182 separate `Normals` columns, `Nodes.0` through `Nodes.1181` — with no array left to `IMPLODE`, and a new column minted every time a switch grows. Getting the node list back as one value today requires a derived column that enumerates every index: ``` IMPLODE(',', REGEXP_REMOVE_ARRAY(ARRAY(`Nodes.0`, ..., `Nodes.1181`), '^$')) ``` That is ~15KB of SQL, reads 1182 columns per row, and silently truncates the moment a node list outgrows the highest column that exists. This adds a `nodes_csv` field alongside `Nodes` holding the comma-joined list, which lands as a single `Normals` column — groupable and filterable with `substr`/regex, no derived column needed. `Nodes` is kept as-is so the per-element columns remain available and ordering is preserved (a tagset would dedupe and reorder, which would break the topology-aware job debugging use case in T275974051). Empty node lists (e.g. `SwitchName=data-transfer Nodes=`) leave `nodes_csv` unset rather than emitting an empty string, matching how the other optional fields behave. Differential Revision: D118152543
2332832 to
462a773
Compare
Summary:
ScontrolTopology.Nodeswas alist[str], and the sinks flatten list fieldsinto one indexed attribute per element (
flatten_dict_factoryinmonitoring/dataclass_utils.py, used byexporters/otel.py). In Scuba thatturned a single node list into 1182 separate
Normalscolumns,Nodes.0through
Nodes.1181, with a new column minted every time a switch grows.Differential Revision: D118152543