dwavesystems / dwavesystems/dimod

API for overriding Sampler default parameter values at construction time

Open
#502 2 comments 0 reactions 0 assignees View on GitHub
enhancement question
Dominant language
Python
Stars
143
Forks
91
Avg merge
1h 24m
Merged PRs (30d)
3

Description

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](https://github.com/dwavesystems/dwave-system/blob/6fc4505d60bb4b988edd94009a3c4b4e2d7337dc/dwave/system/composites/embedding.py#L51)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.