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
We'd expect the following code, where the key 'a' has a state update function for key 'b', to throw an error when executed by cadCAD, but no error is thrown.
From a design standpoint, the most elegant solution would be to drop referencing the state variable on the SUF itself, and only mention the state variable being updated on the psubs
Checking the function output is also likely to be infeasible for a variety of use cases. The only way for not breaking the API is if we adopt an explicit convention of what's the expected behavior. Should it be updated based on the SUF return or should it be updated based on the PSUBs key?
@danlessa could you expand on Checking the function output is also likely to be infeasible for a variety of use cases.? In radCAD, I check that the PSUB and function return keys match, and otherwise throw an error f"PSU state key {state} doesn't match function state key {state_key}", but maybe cadCAD has some other constraints that make this check infeasible.
In the following notebook, the variables dictionary keys are not checked to match against the state update function keys: https://github.com/cadCAD-org/snippets/blob/main/snippets/execution_time_decorator.ipynb
We'd expect the following code, where the key 'a' has a state update function for key 'b', to throw an error when executed by cadCAD, but no error is thrown.
The text was updated successfully, but these errors were encountered: