Skip to content

PymcSampler and fixed parameters #1681

@dweindl

Description

@dweindl

Something's fishy with the handling of fixed parameters in PymcSampler.

PymcSampler.initialize stores a reduced x0:

x0 = problem.get_reduced_vector(x0)

Whereas PymcSampler.sample expects a full x0:

for x_name, val in zip(problem.x_names, self.x0)

Not sure about the impact, but seems like this might have quite unintended consequences.

Would be great if somebody could look into that, fix it, and document the expected length of PymcSampler.x0

To reproduce: add strict=True to

for x_name, val in zip(problem.x_names, self.x0)
and run test/sample/test_sample.py::test_pipeline[Pymc-rosenbrock]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsamplingRelated to sampling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions