Segment and cache Stage 12 US simulations

Geschlossen
#711 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

@anth-volk arbeitet bereits daran.

Seit 30.9.2026.

  • #712 von @anth-volk — offen

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
python

Rechercherichtung

Start by locating the Stage 12 worker coordination path and the existing API v1 runner behavior that defines 20-part execution, then identify the dataset, baseline-cache, deployment-validation, and worker-manifest entry points. Verify the workflow with unit tests for segmentation, caching, coordination, validation, error preservation, and cancellation. Done means independent concurrent baseline and reform execution, 40 segment calls, validated cache artifacts, stable policy errors, consistent failure states, and deployment documentation.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Problem

Stage 12 US reports currently execute each baseline and reform simulation as one calculation. They do not have the 20-part execution and precomputed baseline data used by the API v1 runner. The current coordination path also needs to preserve policy-validation details and stop observing the other simulation normally after either baseline or reform fails.

Scope

  • Implement deterministic 20-part US simulation execution within Stage 12 without importing or calling API v1 runner code.
  • Keep baseline and reform execution separate, producing 40 segment function calls for a complete report.
  • Precompute, version, store, validate, and load the Stage 12 dataset and baseline cache artifacts.
  • Include cache identity and validation results in the Stage 12 worker manifest.
  • Observe baseline and reform concurrently.
  • When either simulation fails, cancel the other simulation, preserve its failure details, and persist consistent report and simulation states.
  • Reject malformed policy effective periods with a stable error code and detailed message.
  • Document the deployment, cache, execution, and failure-handling behavior.
  • Add unit tests for segmentation, cache construction and loading, deployment validation, coordination, error preservation, and cancellation.

Acceptance criteria

  • A successful segmented US report produces two simulation calls and 40 segment calls.
  • Baseline and reform calculations run concurrently and remain separate through aggregation.
  • A failed simulation causes the report to fail and the other simulation to be cancelled or recorded as incomplete.
  • Validation errors retain their structured error code and useful summary at the simulation and report levels.
  • Worker deployment rejects missing, mismatched, or inaccessible cache artifacts.
  • The implementation remains independent of API v1 runner modules.
  • Unit tests and deployment documentation cover the complete workflow.
Vorherrschende Sprache
Python
Sterne
1
Forks
1
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
89

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus PolicyEngine/policyengine-sim-api

Alle Issues in PolicyEngine/policyengine-sim-api

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.