Add opt-in interval CSV measurement export#1270
Open
sankalpsthakur wants to merge 3 commits into
Open
Conversation
sankalpsthakur
force-pushed
the
fix/467-interval-csv-export
branch
from
July 22, 2026 11:58
ae96bb5 to
1c57416
Compare
Write measurement rows on the API/Prometheus live cadence when csv_run_name is set, avoiding ad-hoc flush threads (mlco2#467).
sankalpsthakur
force-pushed
the
fix/467-interval-csv-export
branch
from
July 22, 2026 11:59
1c57416 to
ba687ca
Compare
Author
|
@benoit-cty @mlco2/core-maintainers — implements the #467 approach: opt-in CI is waiting on first-time contributor approval — could a maintainer run the workflows? |
Cover empty-string auto naming and default final-only CSV behavior, and fix spacing so pre-commit style checks stay clean.
sankalpsthakur
force-pushed
the
fix/467-interval-csv-export
branch
3 times, most recently
from
July 22, 2026 14:12
2e37bba to
f3d04e0
Compare
Cover the opt-in live CSV path in output docs and add a regression test for interval export without OutputMethod.CSV.
sankalpsthakur
force-pushed
the
fix/467-interval-csv-export
branch
from
July 22, 2026 14:13
f3d04e0 to
8658551
Compare
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
Fixes #467 by writing CSV measurement rows on the same live cadence as API/Prometheus (
api_call_interval * measure_power_secs).csv_run_name(filename, or"auto"/""→emissions_<run_id>.csv). Defaultemissions.csvstays final-only unlesscsv_run_nametargets the same file.FileOutput.live_outbehindenable_live_out— reuses the existing measurement loop instead of ad-hoc flush threads.Why this matters
Long-running jobs previously had no structured way to inspect intermediate power/emissions without enabling API or Prometheus export. Interval CSV gives operators a file-based audit trail (notebooks, log pipelines, offline analysis) with predictable row cadence and without changing the default single-row
emissions.csvcontract.Related (not in scope here): #559 asks whether power columns belong in CSV — this PR follows the existing measurement schema; #448 covers periodic export for other output modes beyond CSV.
Usage
Test plan
tests/output_methods/test_file.pylive_out coveragetests/test_emissions_tracker.pynamed / auto / empty / same-as-output_file/ default final-only / without CSV methoddocs/reference/output.mdinterval CSV note