We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Description Storing sampling warnings (in SampleSet.info) renders sampleset JSON unserializable.
SampleSet.info
To Reproduce
>>> import json >>> import dimod >>> from dwave.system import EmbeddingComposite, DWaveSampler >>> from dwave.system.warnings import WarningAction >>> >>> bqm = dimod.BQM.from_ising({},{'ab': 1, 'bc': 1, 'ca': 1}) >>> sampler = EmbeddingComposite(DWaveSampler()) >>> >>> sampleset = sampler.sample(bqm, return_embedding=True, warnings=WarningAction.SAVE) >>> >>> json.dumps(sampleset.to_serializable()) Traceback (most recent call last): File "<stdin>", line 1, in <module> ... TypeError: Object of type type is not JSON serializable
Expected behavior json.dumps(sampleset.to_serializable()) should work.
json.dumps(sampleset.to_serializable())
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
Storing sampling warnings (in
SampleSet.info
) renders sampleset JSON unserializable.To Reproduce
Expected behavior
json.dumps(sampleset.to_serializable())
should work.The text was updated successfully, but these errors were encountered: