Repository navigation
feat: campaign carbon estimate and end-of-campaign report (hpc-campaign p4) - #1748
Merged
Merged
Conversation
…report (hpc-campaign p4) autofit.campaign.carbon: E = t x (n_c P_c u_c + n_m x 0.3725 + n_g P_g) x PUE, C = E x CI, in four cases - low (low inputs, measured usage, peak memory), central (usage basis), allocation (u = 1, requested memory) and high (high inputs on the allocation basis); site constants from autonerves (tdp per partition, gpu power, PUE, carbon_intensity bases with ci_basis central and the spread of bases as bounds, ruling F6); no world-average default, a missing input is reported and its figure left out; successful vs failed or repeated work (earlier attempts charged from allocated CPU time); per stage, per completed task, per object. forecast() for planned stages reproduces the report 1.4 worked DR1 estimate exactly (1,239 / 1,717 / 4,494 kWh, 124 / 223 / 854 kgCO2e). Optional, cached NESO period intensity and a 48 h --begin hint, network only on request. autofit.campaign.report: report.md + report.json (compute, energy and carbon with inputs and sources, failure census, stage table, results-index counts, a paper paragraph that says estimate, gives the range and names the basis). CLI: carbon, report. Refs #1746 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A site whose ci_basis basis has no value (or an all-null carbon_intensity table) gave a KeyError / ValueError; it now gives energy only, with the reason in the note. - Tasks pending, running or timeout_pending get their own 'in progress' bucket: excluded from the failed-or-repeated share (now of finished work only) and named in the paragraph as unfinished, never as wasted. - A report with no finished energy (share None) no longer crashes. - --ci given with a site drops the site's bases: the basis is 'given' and the paragraph names no bases the range no longer comes from. - carbon / report with no source is a usage error, not a TypeError. Refs #1746 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 30, 2026
Base automatically changed from
feature/hpc-campaign-p3-plan-evidence
to
main
October 30, 2026 15:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hpc-campaign phase 4 (#1746). Stacked on #1747 (phase 3); merge that first. Both add commands to
campaign/__main__.py, and that conflict is already resolved here. Site constants come from the PyAutoNerves companion PR (PyAutoLabs/PyAutoNerves#209).carbon.py: a Green Algorithms estimate,E = t × (n_c P_c u_c + n_m × 0.3725 W/GB) × PUE,C = E × CI.--pue,--tdpand--cioverride the site values.--neso), the--begin-hintis optional, and nothing uses the network by default.forecast(StageForecast…)estimates a planned campaign.report.py:python -m autofit.campaign reportworks from a live or retro digest, or acampaign.yaml. It writesreport.md+report.jsoncovering compute, energy and carbon, the failure census, per-stage tables and results counts. It ends with a paste-ready paper paragraph that says "estimate", gives the range, names the carbon-intensity basis and the other bases, and lists what is excluded. "Saving" appears nowhere, and a test asserts it.Heart RED override (development only)
Heart was RED at the start of this task (2026-10-30): release validation FAILED (stage integrate); PyAutoHeart/workflows/Release Integrate failure; PyAutoNerves
test_fitsable.py::test__output_to_fitsred; unit-test timing 1 regression (>3× baseline), 14 slow; autogalaxy red; release validation NOT release_ready (v2026.10.30.1.dev85101); autolens_profiling red; worktree drift 1 dirty. The human authorized the Human override for Heart RED (development only) live for hpc-campaign phases 3 and 4 ("Override, proceed"). This PR touches no RED item and does not fix Heart. Merging still needs green CI and a separate/prm; it permits no release.Decisions taken (please check)
Test plan
test_autofit/campaign: 151 passed on this stacked head, including report §1.4's DR1 worked estimate reproduced exactly (1,239 / 1,717 / 4,494 kWh; 124 / 223 / 854 kgCO2e). Also covered: both bases, the split, NESO mocked, and the CLI.autofitworkspace: 10 passed, 0 failed.--cibasis label is correct;reportwith no source gives a usage error.Workspace/Science/scratch/hpc_campaign_p4_w4/(not committed).Refs #1746
🤖 Generated with Claude Code