Skip to content

Conversation

@Yash0270
Copy link
Contributor

@Yash0270 Yash0270 commented Feb 3, 2026

Summary:
Add a new sprio collector to log Slurm job priority information to GCM.
This enables the FAIR Passport tool to display job priority factors for
users across clusters.

The implementation follows the same pattern as sacctmgr_user (T225759676, D77916380):

  • New CLI command: gcm sprio --sink stdout --once
  • Schema: SprioPayload with job priority fields (JOBID, PARTITION, USER,
    ACCOUNT, PRIORITY, SITE, AGE, ASSOC, FAIRSHARE, JOBSIZE, PARTITION_PRIO,
    QOSNAME, QOS, NICE, TRES)
  • Uses custom format string to avoid duplicate column names in sprio -l output
  • Default collection interval: 120s (2 minutes)

Data will be logged to Scuba table fair_sprio via OTEL sink.

Helm configuration: D92180317

Differential Revision: D92178369

@meta-codesync
Copy link

meta-codesync bot commented Feb 3, 2026

@Yash0270 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D92178369.

Summary:
Adds a new `sprio` collector to log Slurm job priority factors to GCM, enabling FAIR Passport to display priority breakdowns for users across clusters.

## What's New

| Component | Description |
|-----------|-------------|
| CLI command | `gcm sprio --sink stdout --once` |
| Schema | `SprioRow` dataclass with format code metadata |
| Output | 14 priority fields (JOBID, PRIORITY, FAIRSHARE, etc.) |
| Collection | Every 2 minutes via `collection_unixtime` snapshots |
| Destination | Scuba table `fair_sprio` via OTEL sink |

## Key Design Decisions

- **Schema-driven format**: Header and format spec are auto-generated from `SprioRow` field definitions, guaranteeing they always match
- **Custom headers**: SLURM's sprio outputs incorrect headers for some codes (`%A` → "AGE" instead of "ASSOC"), so we define our own
- **Consistent ordering**: Jobs sorted by partition and priority descending (`--sort=r,-y`)
- **Type-safe fields**: Numeric fields (JOBID, PRIORITY, SITE, AGE, FAIRSHARE, JOBSIZE, PARTITION_PRIO, NICE) are parsed as float; identifiers remain strings
- **No TRES field**: Removed TRES since it's rarely used and complicates parsing

## Related
- Pattern: follows `sacctmgr_user` (D77916380)
- Helm config: D92180317

Reviewed By: luccabb

Differential Revision: D92178369
@Yash0270 Yash0270 merged commit 1ade0a0 into facebookresearch:main Feb 4, 2026
5 checks passed
@Yash0270 Yash0270 deleted the export-D92178369 branch February 4, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants