Skip to content

Outputs and use of predict metadata #172

Description

@havardhhaugen

The current implementation has some issues - which makes it hard to implement new outputs / modify existing ones.

Subclasses of Output modify and use PredictMetadata in different ways - which tends to cause issues when using multiple outputs or multiple instances of the same output or outputs that require intermediate.

  • This can be solved by creating a single immutable instance of PredictMetadata which describes what is passed from the model to all the outputs via add_forecast(... pred) (each Output recieves the same pred), and then each output has to use the same PredictMetadata to figure out how to route the data correctly.
  • Currently this is solved with a number of if-statements / checks to make the code functional.

Intermediate probably should not subclass from Output - atleast we should not have to call intermediate.add_forecast the way we currently do. add_forecast expects a full forecast outputs, and does several checks for this - but the intermediate shape is not necessarily that of the forecast (verif). Currently this issue is circumvented by modifying PredictMetadata.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions