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
This configuration is passed directly to the configure function for a model.
The intention is this is where we place global configuration, config that remains the same regardless of which component or context the model is going to be used in.
The second place we have configuration is at the component/grouping node level, this is where we have configuration that is intended to be just for that particular component or all the child components under that node in the tree.
The third place we have what can be thought of as configuration is in the component itself as observations parameters.
Currently we treat the node level configuration as if it was just parameters passed in alongside the observation
We need to start treating the node level configuration differently and this means changing the model function signature.
Issues/Problems
This was fine in the past since each model used to return only any new/updated parameters so IF would simply append these to the input observations and pass to the next model.
Since we implemented the importer functionality and now models are responsible for returning all parameters to pass to the next model we have introduced a problem.
Models are passed in config as observations and can't tell if an input was part of the node config or a true input observation.
So the only things models can do is to return all the config and input observations as output observations.
This ends up polluting the output observations and makes it hard to read and navigate the output parameters.
Example
In the existing world a model which outputs carbon with lots of configuration like below
The model only calculated the carbon param but has no choice but to output all the parameters it was passed in as inputs.
NOTE: If you have a series of observations, we are copying static config data into each observation in the series which really bulks up the output yaml even more.
Solution
We change the model function spec to introduce node level config as a param to the execute function.
Models will then know the config for that execution separate from the observations.
They can use that config to decide how to execute.
But they can then return just the observations, and not the config.
Change the model plugin execute function from this
And in the impact framework when calling execute pass in the node level config in the config param and the inputs in the inputs param
Example
Using the same example as above, with this new approach it would just be able to output carbon, the only parameter is is calculating, and leave the config where it is.
Priority
High since the proposed solution would mean changing the model function signature and that has to be done before the hackathon.
Current Behavior
Issues/Problems
Example
In the existing world a model which outputs carbon with lots of configuration like below
Would output something like this
The model only calculated the carbon param but has no choice but to output all the parameters it was passed in as inputs.
NOTE: If you have a series of observations, we are copying static config data into each observation in the series which really bulks up the output yaml even more.
Solution
Change the model plugin execute function from this
to this
And in the impact framework when calling execute pass in the node level config in the
config
param and the inputs in theinputs
paramExample
Using the same example as above, with this new approach it would just be able to output carbon, the only parameter is is calculating, and leave the config where it is.
SoW
The text was updated successfully, but these errors were encountered: