Skip to content

fixed_params should accept keys required for runtime-supplied grids #348

@hmgaudecker

Description

@hmgaudecker

Problem

broadcast_to_template (and the validator chain that follows) rejects
any fixed_params key that no DAG function lists in its signature.
That assumption breaks for runtime-supplied grids: a parameter
referenced by an IrregSpacedGrid(pass_points_at_runtime=True) (or
similar grid-spec consumer) is needed at grid-build time, never by a
DAG function — yet it still needs to flow through fixed_params so
the per-iteration value can size the grid.

The user-visible friction: callers either funnel the param through
model.simulate(params=...) (where it competes with estimation
parameters and arguably doesn't belong) or fabricate a no-op DAG
function that "consumes" it just to satisfy the validator.

Useful when some components of a grid change across optimizer
iterations but others are constant.

Proposal

Relax the validator so a fixed_params key referenced by any
runtime-supplied grid spec is accepted without a DAG-input footprint.
The grid spec already knows which params it needs; surface that to
broadcast_to_template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions