feat: add Slurm service foundation - #894
Conversation
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
Greptile SummaryThe PR introduces typed, dependency-injected service facades for Slurm run planning and rendering, image resolution, and benchmark execution and analysis.
|
| Filename | Overview |
|---|---|
| packages/data-designer-slurm/src/data_designer/slurm/services/errors.py | Defines stable service error codes and operation attribution while redacting unexpected backend failures. |
| packages/data-designer-slurm/src/data_designer/slurm/services/run.py | Adds injected planning and rendering facades with typed, request-correlated results. |
| packages/data-designer-slurm/src/data_designer/slurm/services/images.py | Adds a typed image-resolution facade that verifies reference and image-kind correlation. |
| packages/data-designer-slurm/src/data_designer/slurm/services/benchmark.py | Adds benchmark run and analysis facades with request/result correlation checks. |
| packages/data-designer-slurm/tests/services/test_services.py | Covers public service behavior, invalid requests, backend failures, cancellation, correlation, and error serialization. |
| packages/data-designer-slurm/tests/slurm_test_fakes/services.py | Provides deterministic scripted test doubles for each injected service boundary. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Caller[Public caller] --> Run[SlurmRunService]
Caller --> Image[SlurmImageService]
Caller --> Benchmark[SlurmBenchmarkService]
Run --> Planner[Injected run planner]
Run --> Renderer[Injected batch renderer]
Image --> Resolver[Injected image resolver]
Benchmark --> Backend[Injected benchmark backend]
Planner --> Validate[Validate type and request correlation]
Renderer --> Validate
Resolver --> Validate
Backend --> Validate
Validate --> Result[Typed public result]
Planner -. failure .-> Normalize[Normalize SlurmServiceError]
Renderer -. failure .-> Normalize
Resolver -. failure .-> Normalize
Backend -. failure .-> Normalize
Reviews (4): Last reviewed commit: "fix: clarify Slurm service boundaries" | Re-trigger Greptile
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
|
Thanks for putting this together, @andreatnvidia! SummaryThis adds the intended typed Slurm service foundation for run planning/rendering, image resolution, and benchmark operations, with stable normalized errors and deterministic fakes. The overall shape matches the PR's stated intent, but two correlation guarantees need tightening before these results are safe to consume downstream. FindingsCritical — Let's fix these before merge
Warnings — Worth addressing
What Looks Good
VerdictNeeds changes — bind run plans and benchmark manifests to the exact requested configs, and reject contradictory script bindings before exposing this as a stable public contract. This review was generated by an AI assistant. |
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
|
Good catches. I addressed both in
The regression coverage includes mismatched plans and manifests plus duplicate and stale-first variants for both script bindings. |
|
Thanks for putting this foundation together, @andreatnvidia — the typed boundaries and deterministic fakes are a solid start. SummaryThis PR adds the intended run-planning/rendering, image-resolution, and benchmark service facades with immutable results and normalized public errors. The narrow M0 seam is present, but several cross-record, error-boundary, and public-API commitments are not yet strong or precise enough for a foundation described as stable. FindingsWarnings — Worth addressing
Suggestions — Take it or leave it
What Looks Good
VerdictNeeds changes — centralize the full benchmark correlation contract, put error translation at the public boundary, and settle the plan/render and backend-seam API before treating these classes as stable. The broader opaque-Bash validation and exact-byte digest naming should also be resolved rather than extending heuristic checks. This review was generated by an AI assistant. |
Separate run planning from attempt rendering so retries can reuse an immutable plan. Keep injected implementation seams private and align public service failures with the Data Designer error hierarchy. Signed-off-by: Andre Manoel <amanoel@nvidia.com>
|
@nabinchha Thanks for the detailed pass. I reviewed each point against the #874 slice plan and Stage 2 ownership, then pushed For this slice:
I kept the remaining items with their planned owners:
I also kept the documentation and test organization changes minimal rather than expanding every docstring or splitting the test module without a contract benefit. |
|
Thanks for the thoughtful remediation, @andreatnvidia — the latest commit materially improves the retry boundary and public naming. SummaryThis PR adds typed facades for Slurm planning/rendering, image resolution, and benchmark execution/analysis. FindingsWarnings — Worth addressing
Suggestions — Take it or leave it
What Looks Good
VerdictNeeds changes — make redaction service-owned, avoid publishing facades whose only constructors expose private/unwired dependencies, and establish one authoritative validation path for complete request/result correlation. The persistence status of This review was generated by an AI assistant. |
📋 Summary
Adds the first independently mergeable #874 slice: typed public Slurm service facades and stable result/error contracts backed by private dependency-injected boundaries. This gives M0 a local plan/render service seam without wiring the planner, image, launcher, runtime, state, or benchmark implementations.
🔗 Related Issue
Part of #874
🔄 Changes
SlurmRunService.plan()for immutable plan resolution andrender_attempt()for rendering an existing plan without re-resolution.RenderedSlurmAttemptresult while keeping planner, renderer, image, and benchmark implementation protocols private.DataDesignerError-based stable codes and operation identifiers while redacting unexpected backend details.🔍 Attention Areas
services/run.py- separate M0 plan/render operations and the retry-safe immutable-plan boundary.services/errors.py- public error hierarchy, attribution, and unexpected-error redaction.🧪 Testing
make test-slurmpasses (434 passed)make test-slurm-wheel-installpassesmake check-slurmpasses✅ Checklist