Skip to content

Complete sample overload signatures - #87

Open
danielgaskins wants to merge 1 commit into
dwavesystems:mainfrom
danielgaskins:fix/sample-overload-signatures
Open

danielgaskins wants to merge 1 commit into
dwavesystems:mainfrom
danielgaskins:fix/sample-overload-signatures

Conversation

@danielgaskins

Copy link
Copy Markdown
Contributor

Reference issue

Closes #28

What does this implement/fix?

Lists every keyword-only sample() parameter in both overloads instead of hiding them behind **kwargs. The Literal[True] and Literal[False] annotations still narrow the return type to torch.Tensor or dimod.SampleSet.

This also adds a release note.

Additional information

  • python3 -m pytest -q tests/test_boltzmann_machine.py (27 passed, 6 subtests passed)
  • python3 -m pytest -q --deselect='tests/test_samplers/test_base.py::TestTorchSampler::test_parameters' (156 passed, 70 subtests passed)
  • reno lint
  • The deselected test has an existing local PyTorch CPU/meta-device failure that is reproducible on unchanged main.

AI Generation Disclosure

I used Codex to inspect the overloads, update the signatures, draft the release note, and run validation. I reviewed the changes and test results before submitting.

Signed-off-by: Daniel Gaskins <danielgaskins99@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sample kwargs missing from overloaded sample methods

1 participant