Skip to content

API for overriding Sampler default parameter values at construction time #502

Open
@arcondello

Description

@arcondello

It would nice to be able to set the default values for Sampler.sample keyword arguments on sampler construction.

Something like

class ASampler(dimod.Sampler):
    ...

    def sample(self, bqm, a=1, b=1, c=1):
        ...

sampler = ASampler(parameter_default=dict(a=5, b=3))
sampleset = sampler.sample(bqm, a=3)  # 3 overrides the 5, but b=3 is used

Generalizes #501
See the use of embedding_parameters in EmbeddingComposite

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionQuestion or general discussion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions