Skip to content

Retire the policyengine-core#559 input-record workaround now that core 3.32.27 fixes it #2260

Open

Description

@MaxGhenis

policyengine-core 3.32.27 contains PolicyEngine/policyengine-core#561 ("Keep the record of set_input values in step with storage"), which fixes PolicyEngine/policyengine-core#559: Holder.delete_arrays now forgets the record of an input it deletes, and Simulation.clone gives each clone its own copy of _user_input_keys and an empty _user_input_contexts.

PE-UK still carries its own workaround for #559 in policyengine_uk/simulation.py and policyengine_uk/utils/supplied_inputs.py:

  • a Simulation.clone override that copies _user_input_keys and _user_input_contexts;
  • a Simulation.delete_arrays override and a Simulation.calculate hook that call drop_missing_supplied_inputs;
  • SUPPLIED_INPUT_VARIABLES, which limits the supplied-input helpers to the variables the calculate hook keeps in step.

Once the floor is policyengine-core>=3.32.27, these duplicate what core does and can go. The helpers (supplied_input, supplied_input_periods) keep reading core's record.

Activity

  1. MaxGhenis commented on Oct 10, 2026

    @MaxGhenis
    CollaboratorAuthor

    PR #2262 removes the Simulation.clone override and raises the floor to policyengine-core 3.32.27. The Simulation.delete_arrays override, the Simulation.calculate sweep and SUPPLIED_INPUT_VARIABLES stay. Rebuilding the populations (build_from_populations, which build_from_situation calls) keeps records for the holders it replaces, filed as PolicyEngine/policyengine-core#605, and the review of #2262 showed both pieces still cover that. Keep this issue open until core fixes #605; then raise the floor again and remove the rest.

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