Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix aggregation method #943

Merged
merged 9 commits into from
Aug 8, 2024
Merged
7 changes: 2 additions & 5 deletions Refactor-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,7 @@ The aggregate plugin aggregates data in two ways: first it condenses individual

This is a builtin feature of IF, meaning it does not have to be initialized as a plugin. Instead, you just have to include a short config block in the top of the manifest file. There are two pieces of information required:

- `metrics`: which metrics do you want to aggregate? Every metric you provide here must exist in the output array.

- `method`: the aggregation method for the specied metric
- `metrics`: which metrics do you want to aggregate? Every metric you provide here must exist in the output array and be described in the `parameter-metadata` of the plugin.

- `type`: the options are `horizontal`, `vertical` or both. Horizontal aggregation is the type that condenses each time series into a single summary value. Vertical aggregation is aggregated across components.

Expand All @@ -210,8 +208,7 @@ Here's what the config block should look like:
```yaml
aggregation:
metrics:
'carbon':
method: 'sum'
- carbon
type: 'both'
```

Expand Down
26 changes: 20 additions & 6 deletions manifests/examples/pipelines/nesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ tags:
category: on-premise
aggregation:
metrics:
"carbon":
method: sum
- carbon
type: "both"
initialize:
plugins:
Expand Down Expand Up @@ -139,6 +138,21 @@ initialize:
- carbon-operational
- carbon-embodied
output-parameter: carbon
parameter-metadata:
inputs:
carbon-operational:
description: Operational carbon footprint
unit: gCO2eq
aggregation-method: sum
carbon-embodied:
description: Embodied carbon footprint
unit: gCO2eq
aggregation-method: sum
outputs:
carbon:
description: Total carbon footprint
unit: gCO2eq
aggregation-method: sum
time-sync:
method: TimeSync
path: "builtin"
Expand Down Expand Up @@ -169,10 +183,10 @@ initialize:
unit: seconds
description: time reserved for a component
aggregation-method: avg
network/energy:
description: 'Energy consumed by the Network of the component'
unit: 'kWh'
aggregation-method: 'sum'
network/energy:
description: "Energy consumed by the Network of the component"
unit: "kWh"
aggregation-method: "sum"
tree:
children:
child-0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ description: a full pipeline with the aggregate feature enabled
tags: null
aggregation:
metrics:
carbon:
method: sum
- carbon
type: both
initialize:
plugins:
Expand Down Expand Up @@ -159,6 +158,21 @@ initialize:
- carbon-operational
- carbon-embodied
output-parameter: carbon
parameter-metadata:
inputs:
carbon-operational:
description: Operational carbon footprint
unit: gCO2eq
aggregation-method: sum
carbon-embodied:
description: Embodied carbon footprint
unit: gCO2eq
aggregation-method: sum
outputs:
carbon:
description: Total carbon footprint
unit: gCO2eq
aggregation-method: sum
time-sync:
path: builtin
method: TimeSync
Expand Down
Loading