Logical draft of how the metric processors shall work#1560
Draft
ArneTR wants to merge 1 commit into
Draft
Conversation
Member
Author
|
@ribalba Please add what you think we also need |
Closed
ribalba
reviewed
Feb 12, 2026
ribalba
left a comment
Member
There was a problem hiding this comment.
Perfect. Is what we discussed. The more I think about this the more I like how clean it separates concerns.
| - cpu.energy.rapl.msr.component.provider.CpuEnergyRaplMsrComponentProvider: | ||
| - psu.energy.ac.mcp.machine.provider.PsuEnergyAcMcpMachineProvider | ||
| # - ... | ||
| carbon_input: grid.intensity.elephant.api.global.GridIntensityElephantApiGlobalProvider |
Member
There was a problem hiding this comment.
Why are you creating a new key carbon_input? Wouldn't this just be another input?
| # Another alternative is to take a cpu_utilization_* value and converting into a psu_energy_* value like Cloud Energy | ||
| post_metric_provider_processors: | ||
| SDIAPostMetricProviderProcessor: | ||
| # Processor outputs psu_energy_ac_xgboost_machine |
Member
There was a problem hiding this comment.
Doesn't the SDIA output a linear model and not XGBoost?
|
|
||
| post_phase_stats_processors: | ||
| # https://github.com/Green-Software-Foundation/sci/blob/main/Software_Carbon_Intensity/Software_Carbon_Intensity_Specification.md | ||
| SCI: |
Member
There was a problem hiding this comment.
I would still add a processor script here that then has the SCI values as parameters. Like with metric providers.
| #--- END | ||
|
|
||
| # Processors | ||
| # These processors run after the metric_providers stage |
Member
There was a problem hiding this comment.
I would make clear that they are called in order they are defined here. This is important if a "carbon" processor relies on an "energy" processor.
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.
This PR outlines the concept of introducing two new stages to the GMT:
They run in the pipeline as follows:
Metric Providers -> Post Metric Processors -> Phase Stats -> Post Phase Stats Processors
The already commited
config.yml.exampleoutlines how they are defined in the config.Simplifications and Domain Logic
This PR simplifies the mental load on where processing happens in the GMT and makes it more explicit and more modular.
phase_stats.pywill then really only create avg and aggregate values of metric dataWhen we implement this approach the following refactorings need to be done:
calculate_co2_intensityfrom thephase_stats.pyand bring it to a Post Metric Processor (green-metrics-tool/lib/phase_stats.py
Line 81 in d0a6215
phase_statsand bring it to the Post Phases Stats Processors