Repository navigation
Clean up the GHG FBS yaml methods - #1133
Conversation
… cornerstone fbs method
|
I reviewed the consolidation claim for this draft: that Config equivalence. Restored the deleted NFT YAML chain from
This is as of f8872eb |
|
But note see other integration test failures: https://github.com/cornerstone-data/bedrock/actions/runs/39522590920/job/118969718846 |
|
@bl-young tests now pass, ready for review |
Pinned cornerstone_ghg_fbs_filename loads that exact parquet even when
its stem differs from the selected method, so release and waterfall
configs keep historical nowcast/facilities/NFT objects after YAML stems
consolidate to GHG_national_Cornerstone_{year}.
…onfig
Year Cornerstone GHG methods already embed eGRID, so electricity
disaggregation loads GHG_national_Cornerstone_{year} like every other
path. Keep the supported (IO source, year) pairs on USAConfig.
Review (PR #1133)Tip: What already looks good
Integration run 39522590920 -- what failed and why (historical)Job split: FBS regen / nowcast balance green; A. Stem mismatch (fixed in code by
|
| Test | Pin that mismatched |
|---|---|
test_published_B_matches_snapshot |
NFT ...82e24cd (canonical) |
test_b_usa_non_finetuned_snapshot |
same |
test_domestic_lci_equals_e |
same |
waterfall v06_waterfall_g4_nowcast |
...nowcast_2024_...0e1b0f0 |
waterfall v06_waterfall_g5_facilities |
...facilities_2024_...a166975 |
waterfall 2025_usa_cornerstone_v0_6 |
NFT ...82e24cd |
Load-time stem error is gone on tip. A re-dispatch may still surface content failures (snapshot / waterfall sheet drift).
B. Electricity path (fixed in code by 5cd421d8)
| Test | Error on 39522590920 |
|---|---|
TestElectricityDisaggregationPipeline::test_pipeline_aq_and_diagnostics |
FileNotFoundError ... base_name='GHG_national_Cornerstone_2023_egrid', then AttributeError: ... pop |
test_reagg_internals_stay_407_published_are_405 |
same |
test_reagg_identities_on_scaled_q |
same |
Mechanism (old): fixtures test_usa_config_waste_disagg_electricity_{disaggregation,reaggregation}.yaml use usa_ghg_data_year: 2023, no pin. Disagg selected GHG_national_Cornerstone_2023_egrid via the deleted method map; no YAML / GCS object; getFlowBySector fallback -> NoneType.pop.
Fix: load year stem; allow-list (bea_published, 2023|2024) and (nowcast, 2024) on USAConfig. Product v0_3 electricity configs that pin ..._2024_egrid_...672c37c keep working via cross-stem pin load.
What remains for merge-ready shape
- Re-dispatch
test_integrationon tip including5cd421d8-- expect groups A and B load failures gone; watch for new content/snapshot failures. - Follow-ups (later PR OK):
- Drop no-op
use_facility_ghg_attribution(field + YAML keys + waterfall asserts). - Stale comments / analysis scripts still naming
nowcast_*/*_egridstems (PR body calls this intentional for now). - Optional: re-upload blessed FBS under
GHG_national_Cornerstone_{year}_v…_<hash>and align pin filenames with the year stem.
- Drop no-op
Tests removed / adapted
| Change | Verdict |
|---|---|
Delete test_egrid_yaml_schema_shape.py |
Appropriate |
| Adapt facilities + industrial distillate tests -> year YAML | Appropriate |
Delete test_ghg_nests_point_at_energy_cornerstone |
Reasonable; optional Energy-nest follow-up |
test_usa_config.py asserts historical pin filenames |
Fine with cross-stem pins |
Delete test_egrid_fbs_method.py; add ELECTRICITY_DISAGG_SUPPORTED_IO_YEAR tests |
Appropriate (5cd421d8) |
Workflows
No workflow hardcodes of old FBS stems. No rename needed. Weekday fbs_regeneration is the right numerical guard for YAML vs NFT golden.
Suggested merge bar
- Config equivalence NFT vs year YAML (2017-2024)
- Cross-stem pin load (
801bd080) - FBS regen green (method pin update)
- Electricity: year-stem load + USAConfig IO/year allow-list (
5cd421d8) -
test_integrationre-run on tip (5cd421d8): groups A/B load failures gone - (optional follow-up) retire
use_facility_ghg_attribution+ stale stem docs
|
@jvendries could you do a review of this specifically how it relates to electricity work (see especially 5cd421d) |
Electricity disagg focused review (Project 29 electricity G/T/D v3)cc @bl-young Verdict: Approve from the v3 side. Project 29 does not use the v3 runs on the nowcast path. Electric-power emissions already come from plant-level eGRID inside the nowcast GHG method (#911), not from a separate Before this PR, electricity disaggregation used a special loader: published configs looked up those The config check for which year/IO pairs can turn on disaggregation is the same as before: published 2023, published 2024, and nowcast 2024. Cross-stem pins (
Follow-ups (not merge blockers)
|
bl-young
left a comment
There was a problem hiding this comment.
Integration looks good on tip a8b4066: test_integration #652 green (test_cornerstone_usa, FBS regen, nowcast balance).
That clears the remaining merge-bar item from the earlier review (stem mismatches + eGRID path + the transient usa NameError). Config equivalence 2017-2024 and cross-stem pins still stand. Optional follow-ups (use_facility_ghg_attribution, stale stem docs) can wait.
Approving.
cc:
Closes: #1116
What changed? Why?
GHG_national_Cornerstone_2024.yamlresults match theGHG_national_Cornerstone_nowcast_facilities_transportation_2024.yamlresults that we have most recently been usingTesting
Compared
GHG_national_Cornerstone_2024.yamltoGHG_national_Cornerstone_nowcast_facilities_transportation_2024.yamlon main - ensure the FBS results are the same