Skip to content

Add classes for graph evaluation input/output #268

@clegaspi

Description

@clegaspi

Right now, graph evaluation passes around tuples of (Model, list[Quantity]) to represent a "model and input set". I think this could be more elegantly handled by a fairly simple object. It'd make the code more readable.

Could also move _generates_noncyclic_output() from Graph to this class to evaluate upon creation if we wanted to do that. Right now that evaluation is cut out because it can be relatively expensive during graph evaluation. With provenance caching that we are doing now, it could be made a lot faster.

I think that with the integration with MPContribs in mind and the need for a DataTable-like data structure, maybe the list of Quantity objects could be represented by a row in a table (with certain columns)? I have to look at what exactly this is called in pandas.

We could also have a return set like OutputSet or something. This could hold an exception/error if there was an evaluation problem. It might more elegantly handle this "allow_model_failure" kwarg that we are using. Additionally, we should flesh out custom exceptions so that we catch bugs separately from model evaluation failures due to the nature of the model.

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