Skip to content

Conversation

@MImmesberger
Copy link
Collaborator

@MImmesberger MImmesberger commented Sep 7, 2025

What problem do you want to solve?

This PR reproduces the partialling error of inputs that would be derived function in the tt_function. Its easiest to start with an example. Suppose:

  • The policy_input is x_m
  • You pass x_y as a scalar when requesting the tt_function
  • Then, the tt_function will still ask for x_y as an input, i.e. the partialling that should have happened in step 2 did not happen

The reason is connected to the problems we had when building templates: Derived functions are not created when there is no input data to create them from. In particular, this line in with_processed_params_and_scalars is problematic, because there is no node x_y when creating the tt_function in the example above:

    for n, f in without_tree_logic_and_with_derived_functions.items():
        if n in processed_data:
             ... # This is where the partialling is prepared

From having a quick look at the code, it seems like it wouldn't break anything to carry over any scalar in the processed data through to with_partialled_params_and_scalars (i.e. not just those in without_tree_logic_and_with_derived_functions).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants