You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/major-concepts/manifest-file.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,11 +48,15 @@ tree:
48
48
duration: 3600
49
49
```
50
50
51
-
### Global metadata
51
+
Everything above the `tree` is collectively referred to as the `context`. The `tree` contains the input data and is structured according to the architecture of the application being examined, with individual components being nodes in the tree. Individual components can be grouped under parent nodes.
52
+
53
+
### Context
54
+
55
+
#### Metadata
52
56
53
57
The global metadata includes the `name`, `description`, and `tags` that can be used to describe the nature of the manifest file. For example, you might name the file `Carbon Jan 2024` or similar. A short description might briefly outline the scope of the manifest file, e.g. `company x's carbon emissions due to web serves from Jab 24 - July 24`. Tags can be used to group manifest files (we do not explicitly use this field for anything currently).
54
58
55
-
### Plugin initialization
59
+
#### Initialize
56
60
57
61
The initialize section is where you define which plugins will be used in your manifest file and provide the global configuration for them. Below is sample for initialization:
58
62
@@ -75,6 +79,7 @@ Impact Framework uses the `initialize` section to instantiate each plugin. A plu
75
79
76
80
`outputs`is a list of possible export types (currently `csv`, `yaml`, and `log` are supported).
77
81
82
+
78
83
### Tree
79
84
80
85
The `tree` section of a manifest file defines the topology of all the components being measured. The shape of the `tree` defines the grouping of components. It describes the architecture of the application being studied and contains all the usage observations for each component. The tree has individual components such as leaves, intermediate nodes representing groupings, and the top level is the root.
@@ -158,7 +163,19 @@ tree:
158
163
energy: 0.000811
159
164
```
160
165
161
-
### Inputs
166
+
#### Node config
167
+
168
+
Node level configuration is intended to include any configuration data that is constant from timestep to timestep, but varies across components in the tree. Values that are constant both within *and* across components should go in global config instead.
169
+
170
+
The plugin must be written such that it *expects* these values to exist in node level config and explicitly reads them in. The values expected in node level config should be defined in the plugin README.
171
+
172
+
#### Defaults
173
+
174
+
Defaults are fallback values that are only used if a given value is missing in the inputs array. For example, if you have a value that could feasibly be missing in a given timestep, perhaps because your plugin relies on a third party API that can fail, you can provide a value in `defaults` that can be used as a fallback value.
175
+
176
+
The values in defaults are applied to every timestep where the given value is missing. This means that as well as acting as a fallback `defaults` can be used as a convenience tool for efficiently adding a constant value to every timestep in your inputs array.
177
+
178
+
#### Inputs
162
179
163
180
Every component includes an `inputs` field that gets read into plugins as an array. `inputs` are divided into `observations`, each having a `timestamp` and a `duration`. Every `observation` refers to an element in `inputs` representing some snapshot in time.
0 commit comments