instance_id
stringlengths
10
57
file_changes
listlengths
1
15
repo
stringlengths
7
53
base_commit
stringlengths
40
40
problem_statement
stringlengths
11
52.5k
patch
stringlengths
251
7.06M
drdoctr__doctr-123
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "doctr/__main__.py:configure" ], "edited_modules": [ "doctr/__main__.py:configure" ] }, "file": "doctr/__main__.py" }, { "changes": { "added_entities": nul...
drdoctr/doctr
45305afb454eb5dda06fd0deafce6ce70a0e5cee
Check for travis repo before generating keys. Otherwise it will just fail and you'll have to regenerate. It's a small optimisation though, that will mostly affect users that make typos. Note that github is not case sensitive for usernames, travis is so for example, I regularly get into trouble when I write my userna...
diff --git a/doctr/__main__.py b/doctr/__main__.py index 25889d4c..a50c3236 100644 --- a/doctr/__main__.py +++ b/doctr/__main__.py @@ -182,14 +182,15 @@ def configure(args, parser): login_kwargs = {'auth': None, 'headers': None} build_repo = input("What repo do you want to build the docs for (org/repona...
drdoctr__doctr-225
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "doctr/__main__.py:get_parser", "doctr/__main__.py:deploy" ], "edited_modules": [ "doctr/__main__.py:get_parser", "doctr/__main__.py:deploy" ] }, "file":...
drdoctr/doctr
adcb6b2106ee463af488a901f9aac646e23b6853
Ability to do something different on a tag This tool is mainly designed for uploading dev docs, but it can also be used to upload release docs. In that case, we might need some way to do something different on a tag. Or maybe the logic for uploading on a tag should just go in the individual .travis.yml files, in whic...
diff --git a/.travis.yml b/.travis.yml index c621f5a3..13a07f42 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,6 +51,8 @@ script: # GitHub Wiki deploy echo "This page was automatically deployed by doctr on $(date)" > deploy-test.md; python -m doctr deploy --sync --key-path deploy_key.enc --no-re...
drdoctr__doctr-332
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "doctr/travis.py:setup_GitHub_push", "doctr/travis.py:sync_from_log", "doctr/travis.py:determine_push_rights" ], "edited_modules": [ "doctr/travis.py:setup_GitHub_push...
drdoctr/doctr
3d81f52da6c52b0e062a3c7c5d179cc062287a6b
Detect if the repo is a fork If I'm understanding the behavior I'm seeing correctly, encrypted environment variables aren't available on forks at all, even if they are encrypted with the key for the fork.
diff --git a/.travis.yml b/.travis.yml index 5e0cee53..5badcd81 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,10 @@ script: echo `date` >> test python -m doctr deploy --key-path deploy_key.enc --no-require-master docs; # Test syncing a tracked file with a change - python -m doctr dep...
drdoctr__doctr-337
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "doctr/__main__.py:get_parser", "doctr/__main__.py:configure" ], "edited_modules": [ "doctr/__main__.py:get_parser", "doctr/__main__.py:configure" ] }, "...
drdoctr/doctr
b212186dc2a09ca3c817cdeb57da6e450d858ca4
Issues with travis-ci.com There are some issues with travis-ci.com that weren't fixed at https://github.com/drdoctr/doctr/pull/310 It looks like repos that aren't activated on either lead to a KeyError. Also, apparently the travis-ci.com API has a key to indicate if a repo is also on .org, but it is currently bro...
diff --git a/doctr/__main__.py b/doctr/__main__.py index 810a4f80..87b7782a 100644 --- a/doctr/__main__.py +++ b/doctr/__main__.py @@ -36,15 +36,18 @@ from textwrap import dedent from .local import (generate_GitHub_token, encrypt_variable, encrypt_to_file, upload_GitHub_deploy_key, generate_ssh_key, check_repo_...
drhagen__parsita-63
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "src/parsita/parsers/__init__.py" }, { "changes": { "added_entities": [ "src/parsita/parsers/_alternative.py:FirstAlternativeParser.__rep...
drhagen/parsita
61bf389c6fe69e6f6fb90d9bea0cb06ad3fb35c5
Make `longest` the default alternative parser `longest` was added in #21. It was always intended that it would replace `first` as the behavior of `parser | parser` in version 2.0. Well, version 2.0 is here, so it is time.
diff --git a/docs/alternative_parsers.md b/docs/alternative_parsers.md index 120938f..0253fb0 100644 --- a/docs/alternative_parsers.md +++ b/docs/alternative_parsers.md @@ -2,7 +2,7 @@ ## `parser1 | parser2`: alternative parser -This tries to match `parser1`. If it fails, it then tries to match `parser2`. If both ...
drhagen__parsita-87
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/parsita/parsers/_predicate.py:PredicateParser.consume" ], "edited_modules": [ "src/parsita/parsers/_predicate.py:PredicateParser" ] }, "file": "src/parsita/parsers/...
drhagen/parsita
2821c901a0e181bcb88992b83eaf2431aec22d24
Predicate parser drops failures of inner parser when predicate is false In Parsita 1, the `pred` parser discards all errors from a successful run of the inner parser if the predicate turns out to be false. (The predicate failure is the only failure.) This is not how Parsita promises to work. It promises to always repor...
diff --git a/src/parsita/parsers/_predicate.py b/src/parsita/parsers/_predicate.py index 281b326..af31f6a 100644 --- a/src/parsita/parsers/_predicate.py +++ b/src/parsita/parsers/_predicate.py @@ -14,13 +14,12 @@ class PredicateParser(Generic[Input, Output], Parser[Input, Input]): self.description = descriptio...
drhagen__tensora-27
[ { "changes": { "added_entities": [ "src/tensora/iteration_graph/generate_ir.py:to_ir_sum" ], "added_modules": [ "src/tensora/iteration_graph/generate_ir.py:to_ir_sum" ], "edited_entities": [ "src/tensora/iteration_graph/generate_ir.py:to_ir_terminal_expressi...
drhagen/tensora
f2d30985c01a50a013543deccbcb148a3620f7b8
Don't emit computation when doing assembly Right now, assembly does the exact same thing as evaluate. It should not emit any of the computation.
diff --git a/README.md b/README.md index c7fda23..b13fd6d 100644 --- a/README.md +++ b/README.md @@ -166,32 +166,36 @@ tensora 'y(i) = A(i,j) * x(j)' -f A:ds -t compute -o kernel.c Here is the output of `tensora --help` for reference: ``` - Usage: tensora [OPTIONS] ASSIGNMENT ...
drincruz__python-trie-20
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "trie/trie.py:TriePy" ] }, "file": "trie/trie.py" } ]
drincruz/python-trie
57d83c22c0f5eb9faa10a54c138c4e2e5a0f88d8
change default TRIE_TERMINATOR default '!THIS_IS_THE_END!' was _really_ just an example. Using a \0 terminator makes the most sense. Let's do that.
diff --git a/README.md b/README.md index 77303a0..ba35836 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Example >>> t.contains_word("dogg") False >>> t.root - {'d': {'o': {'g': {'!THIS_IS_THE_END!': {'word': 'dog'}, 's': {'!THIS_IS_THE_END!': {'word': 'dogs'}}, 'g': {'y': {'!THIS_IS_THE_END...
dropbox__pyannotate-26
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pyannotate_tools/annotations/__main__.py:main" ], "edited_modules": [ "pyannotate_tools/annotations/__main__.py:main" ] }, "file": "pyannotate_tools/annotations/__main_...
dropbox/pyannotate
ba80fabf4d9bb9888e8b46bbd47affc5766470f8
Permission denied for Temp file on Windows When I run "pyannotate --type-info ./annotate.json ." with on Windows (both 2.7.14 and 3.6.3, probably others) , I get the following error: Traceback (most recent call last): File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, ...
diff --git a/pyannotate_tools/annotations/__main__.py b/pyannotate_tools/annotations/__main__.py index 709fafa..f1c8190 100644 --- a/pyannotate_tools/annotations/__main__.py +++ b/pyannotate_tools/annotations/__main__.py @@ -42,7 +42,7 @@ def main(): # Run pass 2 with output written to a temporary file. inf...
dropbox__pyannotate-64
[ { "changes": { "added_entities": [ "pyannotate_runtime/collect_types.py:FakeIterator.__init__", "pyannotate_runtime/collect_types.py:FakeIterator.__iter__", "pyannotate_runtime/collect_types.py:FakeIterator.__len__", "pyannotate_runtime/collect_types.py:IteratorType.__init_...
dropbox/pyannotate
b02080a3b340f5b5aa464007510e211ecd0529a3
Detect yield and return opcodes There are some [hacks in MonkeyType](https://github.com/Instagram/MonkeyType/blob/0119311745449560e30ef554ba449a99c1b6679d/monkeytype/tracing.py#L226) that detect yield and return opcodes -- the former to generate Generator/Iterator return annotations, the latter to distinguish between r...
diff --git a/pyannotate_runtime/collect_types.py b/pyannotate_runtime/collect_types.py index ca88866..72d5bbf 100644 --- a/pyannotate_runtime/collect_types.py +++ b/pyannotate_runtime/collect_types.py @@ -41,11 +41,13 @@ from typing import ( Any, Callable, Dict, + Iterable, Iterator, List, ...
dropbox__pyannotate-83
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pyannotate_tools/fixes/fix_annotate_json.py:FixAnnotateJson.get_annotation_from_stub" ], "edited_modules": [ "pyannotate_tools/fixes/fix_annotate_json.py:FixAnnotateJson" ] ...
dropbox/pyannotate
40edbfeed62a78cd683cd3eb56a7412ae40dd124
Fail to apply typeinfo to a python module in a subdirectory The following will fail : ``` > python toto\toto.py ( this generates a type_info.json in current directory ) ``` ``` >dir [...] 25/07/2018 06:22 <DIR> toto 25/07/2018 06:21 784 type_info.json ``` ``` >pyannotate ...
diff --git a/pyannotate_tools/fixes/fix_annotate_json.py b/pyannotate_tools/fixes/fix_annotate_json.py index 5d2c9cd..3fed7f2 100644 --- a/pyannotate_tools/fixes/fix_annotate_json.py +++ b/pyannotate_tools/fixes/fix_annotate_json.py @@ -202,10 +202,12 @@ class FixAnnotateJson(FixAnnotate): self.init_stub_j...
dropbox__stone-117
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "stone/backends/python_helpers.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "sto...
dropbox/stone
1a5cb6d9eab6383dccd12678c3b8723e2a9317d5
Generated .pyi files reference 'long', which is not Python 3 compatible I can think of two ways to fix this: 1. The easy way: replace `'long'` with `'int'` [here](https://github.com/dropbox/stone/blob/master/stone/backends/python_type_mapping.py#L63) 2. Do something with the override_dict A potential problem for...
diff --git a/stone/backends/python_helpers.py b/stone/backends/python_helpers.py index a3c4385..fa58f91 100644 --- a/stone/backends/python_helpers.py +++ b/stone/backends/python_helpers.py @@ -37,12 +37,12 @@ _type_table = { Float32: 'float', Float64: 'float', Int32: 'int', - Int64: 'long', + Int64...
dropbox__stone-131
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "stone/backends/python_type_stubs.py:PythonTypeStubsBackend._generate_struct_class_properties" ], "edited_modules": [ "stone/backends/python_type_stubs.py:PythonTypeStubsBackend" ...
dropbox/stone
e695746e0836dd54d942d6b8a9271d2d3fd8a429
Properties are not always optional Hey Stone team! We found an issue with the typing stub code generated for properties. I believe this block of code should be deleted: https://github.com/dropbox/stone/blob/e695746e0836dd54d942d6b8a9271d2d3fd8a429/stone/backends/python_type_stubs.py#L369-L371 The effect of this blo...
diff --git a/stone/backends/python_type_stubs.py b/stone/backends/python_type_stubs.py index f29058b..6f38967 100644 --- a/stone/backends/python_type_stubs.py +++ b/stone/backends/python_type_stubs.py @@ -363,12 +363,7 @@ class PythonTypeStubsBackend(CodeBackend): for field in struct.all_fields: f...
dropbox__stone-134
[ { "changes": { "added_entities": [ "stone/backend.py:Backend.capture_emitted_output", "stone/backend.py:Backend.emit_placeholder", "stone/backend.py:Backend.add_positional_placeholder", "stone/backend.py:Backend.add_named_placeholder" ], "added_modules": null, ...
dropbox/stone
cfb7453c46d93223966ef4e5c8715a2d9eb27bd0
`python_type_stubs` generator incorrectly puts imports at bottom of file, not top Hi all! This is actually a bug I introduced, just making sure it's tracked somewhere. # The issue Mypy *will not* correctly detect the type of `a` in the following code snippet of a `.pyi` file. ``` a = ... # type: Text from typin...
diff --git a/stone/backend.py b/stone/backend.py index 1831546..9f61f37 100644 --- a/stone/backend.py +++ b/stone/backend.py @@ -123,6 +123,8 @@ class Backend(object): self.output = [] # type: typing.List[typing.Text] self.lineno = 1 self.cur_indent = 0 + self.positional_placeholders ...
dropbox__stone-72
[ { "changes": { "added_entities": [ "stone/backends/python_type_stubs.py:PythonTypeStubsBackend._generate_validator_for", "stone/backends/python_type_stubs.py:PythonTypeStubsBackend._generate_routes" ], "added_modules": null, "edited_entities": [ "stone/backends/py...
dropbox/stone
aee647260f103dcb78a3b6af43d6000a9cbd8eaa
python_type_stubs generator should output _validator and route objects. This was an oversight on my original implementation of `python_type_stubs` - after integrating it into our codebase I've seen a few mypy errors along the lines of ``` has no attribute 'SomeStoneType_validator ``` and ``` Module has no at...
diff --git a/stone/backends/python_type_stubs.py b/stone/backends/python_type_stubs.py index 6a0c6f0..c087c79 100644 --- a/stone/backends/python_type_stubs.py +++ b/stone/backends/python_type_stubs.py @@ -45,6 +45,7 @@ def emit_pass_if_nothing_emitted(codegen): ending_lineno = codegen.lineno if starting_linen...
druid-io__pydruid-58
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pydruid/query.py:QueryBuilder.build_query" ], "edited_modules": [ "pydruid/query.py:QueryBuilder" ] }, "file": "pydruid/query.py" } ]
druid-io/pydruid
ce0982867d4bb3d809ba32c6563dadc8d8d6576f
Exception when `filter=None` When building query if `filter=None` then an exception occurs: ``` File "/Users/se7entyse7en/Envs/viralize-web/lib/python2.7/site-packages/pydruid/utils/filters.py", line 61, in build_filter return filter_obj.filter['filter'] AttributeError: 'NoneType' object has no attribute 'filter'...
diff --git a/pydruid/query.py b/pydruid/query.py index af246a0..cd7c1cf 100644 --- a/pydruid/query.py +++ b/pydruid/query.py @@ -24,12 +24,6 @@ from pydruid.utils.dimensions import build_dimension from pydruid.utils.postaggregator import Postaggregator from pydruid.utils.query_utils import UnicodeWriter -try: - ...
drvinceknight__nbchkr-14
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/nbchkr/utils/__init__.py:remove_cells", "src/nbchkr/utils/__init__.py:write", "src/nbchkr/utils/__init__.py:add_checks" ], "edited_modules": [ "src/nbchkr/utils/_...
drvinceknight/nbchkr
7ac9e38498d7cc9118027495d939f849dae3270c
Clear up variable naming In particular the following two conventions are currently being used: - `nb_json` - `nb_node` Aim for `nb_node`.
diff --git a/src/nbchkr/utils/__init__.py b/src/nbchkr/utils/__init__.py index 67a65c1..9a8afba 100644 --- a/src/nbchkr/utils/__init__.py +++ b/src/nbchkr/utils/__init__.py @@ -27,7 +27,7 @@ def read(nb_path: pathlib.Path, as_version: int = 4) -> dict: def remove_cells( - nb_json, tags_regex_patterns_to_ignore=...
drvinceknight__nbchkr-19
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/nbchkr/utils/__init__.py:remove_cells" ], "edited_modules": [ "src/nbchkr/utils/__init__.py:remove_cells" ] }, "file": "src/nbchkr/utils/__init__.py" } ]
drvinceknight/nbchkr
450c5ac0dee7ccbb2d13ca905459d708727b7e69
Fix the regex for solutions here. Currently the default is to have: ``` ### BEGIN SOLUTION ### END SOLUTION ``` The regex finds that but removes the markers which would be nicer to leave in.
diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index bc1675a..4209e6e 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -21,30 +21,42 @@ jobs: - name: Update pip run: | python -m pip install --upgrade pip - - name: Check format (only on py3...
dssg__argcmdr-30
[ { "changes": { "added_entities": [ "src/argcmdr.py:Command.get_args", "src/argcmdr.py:Command.delegate_args", "src/argcmdr.py:Command._call_", "src/argcmdr.py:Command.get_user_signature", "src/argcmdr.py:Command._user_call", "src/argcmdr.py:Command.delegate"...
dssg/argcmdr
9ff79a965345621b6d0533ce446699e1941cd7fe
local call argument `Local` commands should receive their `local` OS-lookup object as an optional invocation argument (as with `args` and `parser`). For example: ```python class PrintDir(Local): def prepare(self, args, parser, local): return local['ls'] ```
diff --git a/README.rst b/README.rst index 6e81099..2ec2304 100644 --- a/README.rst +++ b/README.rst @@ -172,7 +172,7 @@ In fact, our above, trivial example could be accomplished easily with direct exe ``local``, bound to the ``Local`` base class, is a dictionary which caches path look-ups for system executables. ...
dssg__triage-89
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "triage/db.py:ModelGroup" ] }, "file": "triage/db.py" }, { "changes": { "added_entities": [ "triage/feature_group_mixer.py:leave_one_in" ...
dssg/triage
259af31519000bc2bc94f9300eaf4bc596631551
Add more feature subsetting strategies According to @rayidghani We can't use leave-one-out without leave-one-in, so we should fill out the strategies now.
diff --git a/example_experiment_config.yaml b/example_experiment_config.yaml index 2b5cd470..5eb574d3 100644 --- a/example_experiment_config.yaml +++ b/example_experiment_config.yaml @@ -98,7 +98,7 @@ feature_group_definition: tables: ['prefix_entity_id'] # strategies for generating combinations of groups -# av...
dstl__Stone-Soup-1033
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "stonesoup/metricgenerator/ospametric.py:GOSPAMetric.compute_assignments", "stonesoup/metricgenerator/ospametric.py:GOSPAMetric.compute_gospa_metric" ], "edited_modules": [ "s...
dstl/Stone-Soup
279f8a5291afa29d2c6fe3316dbb59f18eb7ce85
Low efficiency in GOSPA metric computations I'm using [the GOSPA metric](https://stonesoup.readthedocs.io/en/latest/stonesoup.metricgenerator.ospametric.html#stonesoup.metricgenerator.ospametric.GOSPAMetric) to evaluate the tracking results in a scenario that has generated 40 tracks over 30,000 time steps, and I've bee...
diff --git a/stonesoup/metricgenerator/ospametric.py b/stonesoup/metricgenerator/ospametric.py index 26560b9a..c27195af 100644 --- a/stonesoup/metricgenerator/ospametric.py +++ b/stonesoup/metricgenerator/ospametric.py @@ -56,7 +56,7 @@ class GOSPAMetric(MetricGenerator): """ Computes the Generalized Optimal ...
dstl__Stone-Soup-198
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "stonesoup/functions.py:gauss2sigma" ], "edited_modules": [ "stonesoup/functions.py:gauss2sigma" ] }, "file": "stonesoup/functions.py" } ]
dstl/Stone-Soup
184c23f38773ff035fbe82030d35cb627615d926
Unscented Kalman Filter transform : Cannot cast ufunc 'add' output from dtype('float64') to dtype('int32') with casting rule 'same_kind' I am trying to use UKF in place of EKF in the code fragment below. However for UKF i am getting the following stack trace (see below). I noted the defaults are set for UKF if no argum...
diff --git a/stonesoup/functions.py b/stonesoup/functions.py index db7567f2..a1d971f3 100644 --- a/stonesoup/functions.py +++ b/stonesoup/functions.py @@ -130,8 +130,11 @@ def gauss2sigma(state, alpha=1.0, beta=2.0, kappa=None): # Calculate sigma point locations sigma_points = np.tile(state.state_vector, (1...
dstl__Stone-Soup-215
[ { "changes": { "added_entities": [ "stonesoup/metricgenerator/tracktotruthmetrics.py:SIAPMetrics._warn_no_truth", "stonesoup/metricgenerator/tracktotruthmetrics.py:SIAPMetrics._warn_no_tracks" ], "added_modules": null, "edited_entities": [ "stonesoup/metricgenerat...
dstl/Stone-Soup
1bf38717a65d21044480c1da4625be243c7d1b5a
self.metric_manager.generate_metrics() : ZeroDivisionError: division by zero Probably my data, however FYI. ``` File "lib\_mot\mot.py", line 302, in run self.metrics_generate() File "lib\_mot\mot.py", line 253, in metrics_generate self.metrics = self.metric_manager.generate_metrics() File "C:\g\te...
diff --git a/stonesoup/metricgenerator/tracktotruthmetrics.py b/stonesoup/metricgenerator/tracktotruthmetrics.py index d076e4d2..0ac1edca 100644 --- a/stonesoup/metricgenerator/tracktotruthmetrics.py +++ b/stonesoup/metricgenerator/tracktotruthmetrics.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- import datetime +import...
dstl__Stone-Soup-346
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "stonesoup/models/base.py:GaussianModel.rvs", "stonesoup/models/base.py:GaussianModel.pdf" ], "edited_modules": [ "stonesoup/models/base.py:GaussianModel" ] }, "...
dstl/Stone-Soup
0194cff0ed89a5a0de0d018a8d8ff067087e5df2
GuassianModel rvs method generates noise from identity if covariance is None-type Would it be appropriate to handle `covar = None` as 'noiseless'? Currently, using the scipy.stats.multivariate_normal.rvs method will default a covariance to the identity matrix. Therefore, when passing in None, noise is generated.
diff --git a/stonesoup/models/base.py b/stonesoup/models/base.py index 85d048d5..7ed4634d 100644 --- a/stonesoup/models/base.py +++ b/stonesoup/models/base.py @@ -188,8 +188,14 @@ class GaussianModel(Model): distribution. """ + covar = self.covar(**kwargs) + + # If model has None-t...
dstl__Stone-Soup-750
[ { "changes": { "added_entities": [ "stonesoup/measures.py:SquaredMahalanobis.__getstate__", "stonesoup/measures.py:SquaredMahalanobis.__setstate__" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "stonesoup/measures.py:SquaredMahalanob...
dstl/Stone-Soup
18ee65acd5aaf88a9fa31a1b0584b60782e12359
Possible issue with lru cache, _pickle.PicklingError: This must be my setup, The first time I'm seeing lru_cache issues, I use multiprocessing for a lot of different projects, this is a first time error. `Can't pickle <functools._lru_cache_wrapper object at 0xxxxx: it's not the same object as stonesoup.measures.Sq...
diff --git a/stonesoup/measures.py b/stonesoup/measures.py index 5f910e48..c13395ca 100644 --- a/stonesoup/measures.py +++ b/stonesoup/measures.py @@ -1,3 +1,4 @@ +import copy from abc import abstractmethod from functools import lru_cache @@ -169,6 +170,18 @@ class SquaredMahalanobis(Measure): if self.stat...
duckinator__bork-154
[ { "changes": { "added_entities": [ "bork/api.py:aliases" ], "added_modules": [ "bork/api.py:aliases" ], "edited_entities": null, "edited_modules": null }, "file": "bork/api.py" }, { "changes": { "added_entities": [ "bork/cli.py:al...
duckinator/bork
48b6f49be1f71a88a4fc72beddd063d8a2e206f8
Ability to list all aliases The command would be something like `bork alias` or `bork aliases`, I guess. I'm thinking something along the lines of ``` $ cat pyproject.toml [build-system] # Specify the required build system. requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" [tool.b...
diff --git a/.pylintrc b/.pylintrc index 4ebe076..d912ce6 100644 --- a/.pylintrc +++ b/.pylintrc @@ -10,10 +10,6 @@ load-plugins=pylint.extensions.check_elif, pylint.extensions.overlapping_exceptions, pylint.extensions.redefined_variable_type, -# TODO: Should we do this? I mostly added it ...
duckinator__emanate-152
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "emanate/__init__.py:Emanate.valid_file" ], "edited_modules": [ "emanate/__init__.py:Emanate" ] }, "file": "emanate/__init__.py" } ]
duckinator/emanate
51a0d38c3d10044141ef82251c4129dcc7deab02
Empty `~/.git/` despite `.git/` being ignored. This appears to be caused by `emanate.Emanate.valid_file()`: https://github.com/duckinator/emanate/blob/master/emanate/__init__.py#L107-L125 It looks like it doesn't match the directory itself, only things in it. I think the definition of `ignore_patterns` would need to...
diff --git a/emanate/__init__.py b/emanate/__init__.py index 173ccaa..38e1faa 100644 --- a/emanate/__init__.py +++ b/emanate/__init__.py @@ -111,9 +111,13 @@ class Emanate: in the destination directory. """ path = str(path_obj.absolute()) - ignore_patterns = [ - p / "*" if E...
duckinator__emanate-185
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "emanate/cli.py:_parse_args", "emanate/cli.py:main" ], "edited_modules": [ "emanate/cli.py:_parse_args", "emanate/cli.py:main" ] }, "file": "emanate/cli....
duckinator/emanate
aaef5795e968fe3d54fe59d35ffdf1d93118b74e
Support `--version` At the moment only `emanate version` works, not `emanate --version`.
diff --git a/.cirrus.yml b/.cirrus.yml index 9a7d118..b3c3fa6 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -74,31 +74,3 @@ Windows_task: script: - C:\Python\python.exe --version - bork run test - - -# If emanate/version.py is modified on the master branch, make a release. -Release_task: - only_if: "chang...
duecredit__duecredit-106
[ { "changes": { "added_entities": [ "duecredit/dueswitch.py:DueSwitch.dump" ], "added_modules": null, "edited_entities": [ "duecredit/dueswitch.py:DueSwitch._dump_collector_summary", "duecredit/dueswitch.py:DueSwitch.__prepare_exit_and_injections", "duecred...
duecredit/duecredit
108397f32edf8b35ad6b416fa50f33a110263a3b
Make `DueSwitch._dump_collector_summary` public? I am very new to this library, so there may be good reasons to avoid this. However, from my perspective, it seems natural to have `DueSwitch._dump_collector_summary` as a public function (perhaps exposed as `DueSwitch.due_summary` or something) to make using duecredit wi...
diff --git a/duecredit/dueswitch.py b/duecredit/dueswitch.py index 07ea589..1f76fb1 100644 --- a/duecredit/dueswitch.py +++ b/duecredit/dueswitch.py @@ -69,16 +69,23 @@ class DueSwitch(object): return self.__active @never_fail - def _dump_collector_summary(self): + def dump(self, **kwargs): + ...
duecredit__duecredit-147
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "duecredit/dueswitch.py:DueSwitch.__init__" ], "edited_modules": [ "duecredit/dueswitch.py:DueSwitch" ] }, "file": "duecredit/dueswitch.py" } ]
duecredit/duecredit
32e632216a55f2d008cdc21c0eca159b12363df8
Internal failure: VerificationError (cryptography) Hi, I'm trying to follow the PyMVPA tutorial (http://www.pymvpa.org/tutorial.html), but the first import already fails due to an internal duecredit error: `from mvpa2.tutorial_suite import *` gives: ``` 2019-01-18 11:00:43,590 [WARNING] DueCredit internal...
diff --git a/duecredit/dueswitch.py b/duecredit/dueswitch.py index 99e9319..63de5ba 100644 --- a/duecredit/dueswitch.py +++ b/duecredit/dueswitch.py @@ -22,13 +22,13 @@ def _get_duecredit_enable(): "Use 'yes' or 'no', or '0' or '1'") return env_enable.lower() in ('1', 'yes', 'true') + @neve...
dunossauro__splitty-22
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "splitty/__init__.py" }, { "changes": { "added_entities": [ "splitty/splitty.py:nun_or_match", "splitty/splitty.py:str_eq", ...
dunossauro/splitty
8ddc399330416fdecbcbb3e9264f3d50f5f386a4
Regex support on find_elements `find_elements` function works only in full match case. ```Python >>> list_to_be_splited = ['spam', 1, 2, 3, 'eggs', 1, 2, 3, 'foo', 1, 2, 3] >>> split_by = ['spam', 'eggs', 'foo'] >>> splited = find_elements(list_to_be_splited, split_by) # [(0, 'spam'), (4, 'eggs'), (8, 'foo')] ...
diff --git a/pylava.ini b/pylava.ini index 1c20fd4..a52bd1d 100644 --- a/pylava.ini +++ b/pylava.ini @@ -5,8 +5,5 @@ linters=pep8,pep257,pyflakes [pylava:pep8] max_line_length = 80 -[pylava:*/__init__.py] -ignore=D104 - [pylava:*/test_*] ignore=D100,D101,D102 diff --git a/splitty/__init__.py b/splitty/__init__.py...
duo-labs__parliament-142
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "parliament/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "parliament/po...
duo-labs/parliament
56a599a98fc171de586bc56775036a87125425ab
"No resources match" - might be inaccurate due to resource type comparison This is related to #9, but I'm opening it up as a separate issue because I think #9 is a possible root cause, but this one is the symptom. I ran Parliament on this policy: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies...
diff --git a/parliament/__init__.py b/parliament/__init__.py index 46d6b1e..ca9c757 100644 --- a/parliament/__init__.py +++ b/parliament/__init__.py @@ -1,7 +1,7 @@ """ This library is a linter for AWS IAM policies. """ -__version__ = "1.0.0" +__version__ = "1.1.0" import fnmatch import functools diff --git a/pa...
duo-labs__parliament-184
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "parliament/statement.py:Statement.analyze_statement" ], "edited_modules": [ "parliament/statement.py:Statement" ] }, "file": "parliament/statement.py" } ]
duo-labs/parliament
1ea9f0b3890223fa9a47503be9f1b739610ac73e
Identify any star in a resource In #72, I added a finding for whenever a policy has a Resource of `*` when the policy supports a more fine-grained resource. This could be bypassed by specifying a resource such as `arn:aws:s3:::*` so I should alert on any use of `*`, although I may want to make the ARN parsing a bit sm...
diff --git a/parliament/config.yaml b/parliament/config.yaml index e56906a..e70c87b 100644 --- a/parliament/config.yaml +++ b/parliament/config.yaml @@ -115,6 +115,12 @@ RESOURCE_STAR: severity: LOW group: MALFORMED +RESOURCE_EFFECTIVELY_STAR: + title: Unnecessary use of Resource * based on wildcards + descri...
duo-labs__parliament-185
[ { "changes": { "added_entities": [ "parliament/__init__.py:strip_var_from_arn" ], "added_modules": [ "parliament/__init__.py:strip_var_from_arn" ], "edited_entities": [ "parliament/__init__.py:is_arn_match", "parliament/__init__.py:is_arn_strictly_va...
duo-labs/parliament
1ea9f0b3890223fa9a47503be9f1b739610ac73e
Policy variables in the resource element not supported Hi, example policy: ```json { "Version": "2012-10-17", "Statement": [ { "Sid": "BucketAccess", "Effect": "Allow", "Action": [ "s3:GetBucketLocation", "s3:GetBucketVersioning", "s3:GetEncryptionConfigura...
diff --git a/parliament/__init__.py b/parliament/__init__.py index 91dd4b3..1596023 100644 --- a/parliament/__init__.py +++ b/parliament/__init__.py @@ -115,7 +115,8 @@ def is_arn_match(resource_type, arn_format, resource): if "bucket" in resource_type: # We have to do a special case here for S3 buckets...
duo-labs__parliament-37
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "parliament/__init__.py:enhance_finding", "parliament/__init__.py:is_arn_match" ], "edited_modules": [ "parliament/__init__.py:enhance_finding", "parliament/__init__.p...
duo-labs/parliament
6f510f110286fb5a5e7d9b578aee506e99041d40
RESOURCE_MISMATCH not correct for redshift:GetClusterCredentials It seems like there is a problem with the logic in `is_arn_match`. I ran into an issue with `redshift:GetClusterCredentials`. Simple repro => ``` $ parliament --string ' { "Statement": [ { "Action": "redshift:GetClusterC...
diff --git a/parliament/__init__.py b/parliament/__init__.py index cfa5602..fee4d08 100644 --- a/parliament/__init__.py +++ b/parliament/__init__.py @@ -39,7 +39,7 @@ def enhance_finding(finding): finding.severity = config_settings["severity"] finding.title = config_settings["title"] finding.description ...
duo-labs__parliament-8
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "parliament/statement.py:Statement.analyze_statement" ], "edited_modules": [ "parliament/statement.py:Statement" ] }, "file": "parliament/statement.py" } ]
duo-labs/parliament
c06bcde102981010baa7a7fe70ab35a2595d6f9b
Validate Statement Id values If set, the `Sid` field in IAM policies may only contain characters from `(A-Z,a-z,0-9)`. `parliament` should declare a finding if `Sid` has spaces or other invalid characters.
diff --git a/parliament/statement.py b/parliament/statement.py index bf663c9..cd9ab34 100644 --- a/parliament/statement.py +++ b/parliament/statement.py @@ -632,6 +632,15 @@ class Statement: else: self.effect_allow = False + # Check Sid + if "Sid" in self.stmt and not re.fullmatch(...
duo-labs__py_webauthn-120
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "webauthn/helpers/structs.py:BytesLike.validate" ], "edited_modules": [ "webauthn/helpers/structs.py:BytesLike" ] }, "file": "webauthn/helpers/structs.py" } ]
duo-labs/py_webauthn
381aad2548a884b54bc928dd3fbc37dbe68514c9
Pydantic/bytes validation doesn't accept Python memoryview The latest version going back to pydantic with a custom 'bytes' validation class still throws an error during runtime validation in the case of peewee+postresql. In this case - a python memoryview type is being returned. That should also be 'ok' as being byt...
diff --git a/webauthn/helpers/structs.py b/webauthn/helpers/structs.py index 9ae33bc..74274ab 100644 --- a/webauthn/helpers/structs.py +++ b/webauthn/helpers/structs.py @@ -44,6 +44,7 @@ class BytesLike(bytes): - https://github.com/duo-labs/py_webauthn/issues/110 - https://github.com/duo-labs/py_webauthn/issu...
duo-labs__py_webauthn-129
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "webauthn/helpers/structs.py:AuthenticatorTransport" ] }, "file": "webauthn/helpers/structs.py" } ]
duo-labs/py_webauthn
81f7d86d0c8d8eb6b7fa0fddcd704a658d0a9b85
Support for Chrome caBLE v2 In chrome one can now use an Android phone as security key (see https://blog.millerti.me/2021/06/18/previewing-chromes-cable-v2-support-for-webauthn/ - the functionality has now made its way into the regular release of Chrome). This methods returns the transport method name 'cable'. For ...
diff --git a/webauthn/helpers/structs.py b/webauthn/helpers/structs.py index 74274ab..16800c4 100644 --- a/webauthn/helpers/structs.py +++ b/webauthn/helpers/structs.py @@ -74,6 +74,7 @@ class AuthenticatorTransport(str, Enum): `NFC`: Near Field Communication `BLE`: Bluetooth Low Energy `INTE...
duo-labs__py_webauthn-150
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "examples/registration.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_mo...
duo-labs/py_webauthn
c3c6c21f76937b08aed089897fe595f8b9232cdf
Update response structures for new L3 draft JSON serialization WebAuthn L3 will introduce new JSON serialization methods and structs that this project can preemptively conform to. See the following links for more info: - https://w3c.github.io/webauthn/#dom-publickeycredential-tojson - https://w3c.github.io/webauth...
diff --git a/examples/registration.py b/examples/registration.py index 539c066..8f94ea4 100644 --- a/examples/registration.py +++ b/examples/registration.py @@ -62,12 +62,12 @@ registration_verification = verify_registration_response( "rawId": "ZoIKP1JQvKdrYj1bTUPJ2eTUsbLeFkv-X5xJQNr4k6s", "response":...
duo-labs__py_webauthn-167
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "webauthn/helpers/parse_authenticator_data.py:parse_authenticator_data" ], "edited_modules": [ "webauthn/helpers/parse_authenticator_data.py:parse_authenticator_data" ] }, ...
duo-labs/py_webauthn
a86965850429b86c94ac18db875cbbf545d0ebe2
Systemic presence of extra byte for registration with eddsa In goal to register a passkey on a website, I use a php library (https://github.com/web-auth/webauthn-framework). When I try to register a new credential with eddsa as 'prefered' algorithm, the load of passkey's response failed for presence of extra bytes in a...
diff --git a/webauthn/helpers/parse_authenticator_data.py b/webauthn/helpers/parse_authenticator_data.py index c9d12ea..5792def 100644 --- a/webauthn/helpers/parse_authenticator_data.py +++ b/webauthn/helpers/parse_authenticator_data.py @@ -57,6 +57,23 @@ def parse_authenticator_data(val: bytes) -> AuthenticatorData: ...
duo-labs__py_webauthn-197
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "webauthn/helpers/options_to_json.py:options_to_json" ], "edited_modules": [ "webauthn/helpers/options_to_json.py:options_to_json" ] }, "file": "webauthn/helpers/options...
duo-labs/py_webauthn
a3fb0a53869e51a29c92fd1aea0c9f3e6d34be6a
Can't use `bytes` as user ID Given that the user handle is an `ArrayBuffer` in the WebAuthn API, I expected that the `user_id` value in this library would accept a random value of `bytes`. I was surprised to find that this is not supported. This is probably an intentional design decision, but I thought I'd report th...
diff --git a/webauthn/helpers/options_to_json.py b/webauthn/helpers/options_to_json.py index cd11be2..4b61c74 100644 --- a/webauthn/helpers/options_to_json.py +++ b/webauthn/helpers/options_to_json.py @@ -23,13 +23,10 @@ def options_to_json( _rp["id"] = options.rp.id _user: Dict[str, Any] = { + ...
duo-labs__py_webauthn-241
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "webauthn/authentication/verify_authentication_response.py:verify_authentication_response" ], "edited_modules": [ "webauthn/authentication/verify_authentication_response.py:VerifiedAu...
duo-labs/py_webauthn
aa365d75e58bb5c506226449a9b859897f024811
Tweak SafetyNet check SafetyNet-based attestation is on its way out for Android Keystore attestation via Play Integrity (if I'm understanding https://developer.android.com/privacy-and-security/safetynet/deprecation-timeline and https://android-developers.googleblog.com/2024/09/attestation-format-change-for-android-fido...
diff --git a/webauthn/authentication/verify_authentication_response.py b/webauthn/authentication/verify_authentication_response.py index 76a11dd..6674f2e 100644 --- a/webauthn/authentication/verify_authentication_response.py +++ b/webauthn/authentication/verify_authentication_response.py @@ -35,7 +35,6 @@ class Verifie...
duosecurity__duo_client_python-137
[ { "changes": { "added_entities": [ "duo_client/admin.py:Admin.get_endpoint" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "duo_client/admin.py:Admin" ] }, "file": "duo_client/admin.py" } ]
duosecurity/duo_client_python
34c165c3a74ec791c5e2079872b8dceba14e3d5d
Retrieve Endpoint by ID Would be great if there was a function in the admin client that covered this endpoint. `/admin/v1/endpoints/[epkey]`
diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 4b666cd..d61eb4f 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -7,7 +7,7 @@ jobs: strategy: matrix: - python-version: [2.7, 3.5, 3.6, 3.7, 3.8] + python-version: [2.7,...
duosecurity__duo_client_python-220
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "duo_client/client.py:Client.parse_json_response_and_metadata" ], "edited_modules": [ "duo_client/client.py:Client" ] }, "file": "duo_client/client.py" } ]
duosecurity/duo_client_python
cb2eb878247012c699b8e5d88db11fc96fcea3f2
metadata parse error in add_user_phone When trying to add an existing phone to an existing user, e.g. with: ```python import duo_client admin_api = duo_client.Admin( ikey="xxx", skey="xxx", host="api-xxx.duosecurity.com" ) admin_api.add_user_phone(user_id="userxxx", phone_id="phonexxx") ``` I ...
diff --git a/duo_client/client.py b/duo_client/client.py index d959c62..72abd9b 100644 --- a/duo_client/client.py +++ b/duo_client/client.py @@ -585,7 +585,7 @@ class Client(object): raise_error('Received error response: %s' % data) response = data['response'] metadata = data....
duosecurity__duo_client_python-86
[ { "changes": { "added_entities": [ "duo_client/admin.py:Admin.get_group_users_iterator" ], "added_modules": null, "edited_entities": [ "duo_client/admin.py:Admin.get_group_users" ], "edited_modules": [ "duo_client/admin.py:Admin" ] }, "fi...
duosecurity/duo_client_python
c69c3da2e13f8a7680c06d94f80fadb23eb49ec9
group pagination not part of the code Hi, In `duo_client/admin.py`, there are `get_user_groups` and `get_user_groups_iterator` which (via `json_paging_api_call` in `duo_client/client.py`) seem to be doing the pagination for us (kinda already touched on in #63). Minor note: per https://duo.com/docs/adminapi#retrie...
diff --git a/duo_client/admin.py b/duo_client/admin.py index 48bb1d6..c482019 100644 --- a/duo_client/admin.py +++ b/duo_client/admin.py @@ -2001,7 +2001,7 @@ class Admin(client.Client): return self.json_api_call('GET', url + group_id, {}) - def get_group_users(self, group_id, limit=100, offset=0): + ...
duqtools__duqtools-647
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/duqtools/utils.py:read_imas_handles_from_file" ], "edited_modules": [ "src/duqtools/utils.py:read_imas_handles_from_file" ] }, "file": "src/duqtools/utils.py" } ]
duqtools/duqtools
298e9a7435f510af5bd70cbf015f5afbe717b6f8
duqtools dash no longer working on Gateway I receive the following error when running `duqtools dash` on the Gateway, using the `firefox/latest` module for the browser. ``` Traceback (most recent call last): File "/afs/eufus.eu/user/g/g2aho/.local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_...
diff --git a/src/duqtools/utils.py b/src/duqtools/utils.py index 81e84bf..ed23e91 100644 --- a/src/duqtools/utils.py +++ b/src/duqtools/utils.py @@ -35,7 +35,7 @@ def work_directory(path: PathLike): os.chdir(prev_cwd) -def read_imas_handles_from_file(inp: PathLike, ) -> dict[str, ImasHandle]: +def read_ima...
dwavesystems__dimod-171
[ { "changes": { "added_entities": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel.__contains__", "dimod/binary_quadratic_model.py:BinaryQuadraticModel.__iter__" ], "added_modules": null, "edited_entities": [ "dimod/binary_quadratic_model.py:BinaryQuadraticM...
dwavesystems/dimod
2859c969a064fb2b7053919c8f1b50977a408511
BinaryQuadraticModel should have a correct abstract base class Should be `collections.abc.Sized` as currently implemented. Also could be `collections.abc.Container` or even `collections.abc.Collection`.
diff --git a/dimod/binary_quadratic_model.py b/dimod/binary_quadratic_model.py index 47a6c83b..80397f47 100644 --- a/dimod/binary_quadratic_model.py +++ b/dimod/binary_quadratic_model.py @@ -5,6 +5,7 @@ todo - describe Ising, QUBO and BQM """ from __future__ import absolute_import, division +from collections import...
dwavesystems__dimod-174
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/response.py:Response.__init__", "dimod/response.py:Response.samples" ], "edited_modules": [ "dimod/response.py:Response" ] }, "file": "dimod/response.py" ...
dwavesystems/dimod
7b75e47ce4fec541e432f84367ba58393934b941
data_vectors should have either numpy array values, or a list values, but not both. https://github.com/dwavesystems/dimod/blob/7b75e47ce4fec541e432f84367ba58393934b941/dimod/response.py#L40 Making it be more than one thing requires the parser of the response to inspect the object before using it. If we want to have ...
diff --git a/dimod/response.py b/dimod/response.py index d3b2c38d..59d96329 100644 --- a/dimod/response.py +++ b/dimod/response.py @@ -87,21 +87,24 @@ class Response(Iterable, Sized): self._samples_matrix = samples_matrix num_samples, num_variables = samples_matrix.shape - if not isinstance(d...
dwavesystems__dimod-219
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/response.py:Response.done", "dimod/response.py:Response.from_futures" ], "edited_modules": [ "dimod/response.py:Response" ] }, "file": "dimod/response.py"...
dwavesystems/dimod
54303f184427d1b3a2741cfb7ea1b1263f68a361
Response futures appear to be strings? ``` from dwave.system.samplers import DWaveSampler sampler = DWaveSampler(profile='BAY4') h = {} J = {(0, 4): -1} response = sampler.sample_ising(h, J, num_reads=10) print response.done() ``` yields ``` AttributeError: 'str' object has no attribute 'done' ``` If ...
diff --git a/dimod/response.py b/dimod/response.py index 1378ed70..e2b30309 100644 --- a/dimod/response.py +++ b/dimod/response.py @@ -230,7 +230,7 @@ class Response(Iterable, Sized): True """ - return all(future.done() for future in self._futures) + return all(future.done() for fu...
dwavesystems__dimod-220
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/response.py:Response.done", "dimod/response.py:Response.from_pandas", "dimod/response.py:Response.from_futures" ], "edited_modules": [ "dimod/response.py:Respon...
dwavesystems/dimod
54303f184427d1b3a2741cfb7ea1b1263f68a361
numpy FutureWarning FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. samples_matrix = samples_df.as_matrix(columns=variable_labels)
diff --git a/dimod/response.py b/dimod/response.py index 1378ed70..89891418 100644 --- a/dimod/response.py +++ b/dimod/response.py @@ -230,7 +230,7 @@ class Response(Iterable, Sized): True """ - return all(future.done() for future in self._futures) + return all(future.done() for fu...
dwavesystems__dimod-240
[ { "changes": { "added_entities": [ "dimod/binary_quadratic_model.py:OrderedBinaryQuadraticModel.__init__" ], "added_modules": [ "dimod/binary_quadratic_model.py:OrderedBinaryQuadraticModel" ], "edited_entities": [ "dimod/binary_quadratic_model.py:BinaryQuadr...
dwavesystems/dimod
8ebfffa42319aa4850cfc5a1c99a8711eac44722
Allow user-specified mapping type for `BinaryQuadraticModel`s ``` bqm = dimod.BinaryQuadraticModel(linear, quadratic, offset, vartype, mapping_type=OrderedDict) ``` This would affect `.linear` and `.quadratic`, possibly `.adj` as well.
diff --git a/dimod/binary_quadratic_model.py b/dimod/binary_quadratic_model.py index 970163c3..3cbe679d 100644 --- a/dimod/binary_quadratic_model.py +++ b/dimod/binary_quadratic_model.py @@ -46,12 +46,12 @@ of a problem. """ from __future__ import absolute_import, division -from collections import Sized, Container,...
dwavesystems__dimod-259
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/embedding/transforms.py:unembed_response" ], "edited_modules": [ "dimod/embedding/transforms.py:unembed_response" ] }, "file": "dimod/embedding/transforms.py" }...
dwavesystems/dimod
4ebac589cfcddcfcef4b4e5160a07c5f67d999f6
Unembedding fails for bqms that are a subset of the source graph **Description** Unembedding fails when the embedding has more variables than the BQM. **To Reproduce** ``` import numpy as np import dimod response = dimod.Response(np.rec.array([([-1, 1, -1, 1, -1, 1, -1, 1], -1.4, 1), ([-1, ...
diff --git a/dimod/embedding/transforms.py b/dimod/embedding/transforms.py index 491c3a4a..b72dbda6 100644 --- a/dimod/embedding/transforms.py +++ b/dimod/embedding/transforms.py @@ -416,13 +416,15 @@ def unembed_response(target_response, embedding, source_bqm, chain_break_method= Sample(sample={'x2': 0, 'x1':...
dwavesystems__dimod-263
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel.to_coo", "dimod/binary_quadratic_model.py:BinaryQuadraticModel.from_coo" ], "edited_modules": [ "dimod/binary_quadratic_m...
dwavesystems/dimod
53a6efa00f23cd87774579536d589433601adca7
Support metadata in COO (like vartype) **Application** Currently, (de-)serialization of BQMs is partial and with loss of information - vartype is not stored/loaded. It would be nice to have a complete (de-)serialization of BQM to COO format, like we already have for JSON and BSON. E.g.: ``` bqm = BinaryQuadraticM...
diff --git a/dimod/binary_quadratic_model.py b/dimod/binary_quadratic_model.py index 31450ad8..995c36cd 100644 --- a/dimod/binary_quadratic_model.py +++ b/dimod/binary_quadratic_model.py @@ -1391,7 +1391,7 @@ class BinaryQuadraticModel(Sized, Container, Iterable): # conversions #######################################...
dwavesystems__dimod-266
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/embedding/transforms.py:unembed_response" ], "edited_modules": [ "dimod/embedding/transforms.py:unembed_response" ] }, "file": "dimod/embedding/transforms.py" }...
dwavesystems/dimod
67f88fd545767cf999bf86e86bf93489f3a503b9
Feature Request: Throw warning when unembedding results in too many chain breaks Proposed syntax: ``` resp = unembed_response(response, embedding, bqm, warning_threshold=.1) ``` In this case a `UserWarning` will be raised if more than 10% of the chains are broken.
diff --git a/dimod/embedding/transforms.py b/dimod/embedding/transforms.py index b72dbda6..4acba9fe 100644 --- a/dimod/embedding/transforms.py +++ b/dimod/embedding/transforms.py @@ -23,7 +23,7 @@ import numpy as np from six import iteritems, itervalues from dimod.binary_quadratic_model import BinaryQuadraticModel ...
dwavesystems__dimod-296
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "dimod/sampleset.py" } ]
dwavesystems/dimod
30c9b5a8bc289aee9b276a4ebc2ce27e8413e2f9
Missing itertools import **Description** Missing itertools import in `sampleset.py` https://github.com/dwavesystems/dimod/blob/30c9b5a8bc289aee9b276a4ebc2ce27e8413e2f9/dimod/sampleset.py#L517 **Steps To Reproduce** ``` resp.samples(n=1) ```
diff --git a/dimod/sampleset.py b/dimod/sampleset.py index 682aac68..70e3795f 100644 --- a/dimod/sampleset.py +++ b/dimod/sampleset.py @@ -21,6 +21,8 @@ of NumPy's array_like_ to allow for arbitrary variable labels. like-objects-to-numpy-arrays """ +import itertools + from collections import Iterable, Sized, M...
dwavesystems__dimod-307
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/sampleset.py:as_samples" ], "edited_modules": [ "dimod/sampleset.py:as_samples" ] }, "file": "dimod/sampleset.py" } ]
dwavesystems/dimod
63d9efac1c553e86c2cab6554d0af1ab3188b3c7
Can't create empty SampleSet with from_samples We can get an empty `Response`: ``` >>> dimod.Response.from_samples([], {'energy': []}, info={}, vartype=bqm.vartype) Response(rec.array([], dtype=[('sample', 'i1', (0,)), ('energy', '<f8'), ('num_occurrences', '<f8')]), [], {}, 'SPIN') ``` but not an empty...
diff --git a/dimod/sampleset.py b/dimod/sampleset.py index 88d837e9..b5a23cc0 100644 --- a/dimod/sampleset.py +++ b/dimod/sampleset.py @@ -119,6 +119,13 @@ def as_samples(samples_like, dtype=None): return samples, labels + # if no ` is specified and the array_like doesn't already have a dtype, we defaul...
dwavesystems__dimod-310
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel.scale" ], "edited_modules": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel" ] }, "file": "dimod/binary_qua...
dwavesystems/dimod
680b0434b77e17e211e74f84503b05a476b9ec64
Allow scaling of subset of bqm biases **Application** In the case of embedded bqm's, it would be useful to be able to scale the original biases without scaling the chain biases **Proposed Solution/Alternatives Considered** Pattern A: ``` bqm.lock_interactions([('a', 'b'), ('b', 'c')]) bqm.scale(.5) ``` Patt...
diff --git a/dimod/binary_quadratic_model.py b/dimod/binary_quadratic_model.py index 27118b1c..c8e57ec2 100644 --- a/dimod/binary_quadratic_model.py +++ b/dimod/binary_quadratic_model.py @@ -844,13 +844,19 @@ class BinaryQuadraticModel(Sized, Container, Iterable): """ self.add_offset(-self.offset) -...
dwavesystems__dimod-331
[ { "changes": { "added_entities": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel.fix_variables" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel" ] }, "file": "dimod/bi...
dwavesystems/dimod
e89fd52174afdcb783a7859892b328ee989e01dd
Add fix_variables (fix multiple variables at once) **Application** For example, given a multiplication circuit CSP, I'd like to do this: ``` In [142]: bqm.fix_variables({'a0': 1, 'a1': 0, 'a2': 1, 'b0': 1, 'b1': 1, 'b2': 0}) ``` Instead of this: ``` In [142]: bqm.fix_variable('a0', 1) In [143]: bqm.fix_va...
diff --git a/dimod/binary_quadratic_model.py b/dimod/binary_quadratic_model.py index f6121123..28996cd9 100644 --- a/dimod/binary_quadratic_model.py +++ b/dimod/binary_quadratic_model.py @@ -981,6 +981,22 @@ class BinaryQuadraticModel(abc.Sized, abc.Container, abc.Iterable): self.add_offset(value * linear[v]) ...
dwavesystems__dimod-334
[ { "changes": { "added_entities": [ "dimod/sampleset.py:SampleSet.to_pandas_dataframe" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "dimod/sampleset.py:SampleSet" ] }, "file": "dimod/sampleset.py" } ]
dwavesystems/dimod
54a79d8ad74234aac298d41531c76f73ee607b1b
Export SampleSet object to Pandas df **Application** It would be useful for Pandas users to be able to export the `SampleSet`/`Response` objects into a pandas dataframe. **Proposed Solution** ``` samples = dimod.ExactSolver().sample_ising(h, J) df = samples.to_pandas_dataframe() ```
diff --git a/dimod/sampleset.py b/dimod/sampleset.py index 9b5dc365..41ff5c1c 100644 --- a/dimod/sampleset.py +++ b/dimod/sampleset.py @@ -770,6 +770,37 @@ class SampleSet(Iterable, Sized): from dimod.io.json import sampleset_decode_hook return sampleset_decode_hook(obj, cls=cls) + ##############...
dwavesystems__dimod-336
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/embedding/transforms.py:embed_bqm" ], "edited_modules": [ "dimod/embedding/transforms.py:embed_bqm" ] }, "file": "dimod/embedding/transforms.py" } ]
dwavesystems/dimod
54a79d8ad74234aac298d41531c76f73ee607b1b
Embedding QUBO leads to out-of-range linear terms. If I determine the correct scaling factor to scale a QUBO such that the Ising form fits in the QPU range, I should be able to scale the QUBO by this amount, embed it, and solve the Ising. However, the embedding causes some linear QUBO terms to be out of range in the r...
diff --git a/dimod/embedding/transforms.py b/dimod/embedding/transforms.py index 4acba9fe..42a65912 100644 --- a/dimod/embedding/transforms.py +++ b/dimod/embedding/transforms.py @@ -35,7 +35,8 @@ __all__ = ['embed_bqm', ] -def embed_bqm(source_bqm, embedding, target_adjacency, chain_strength=1.0): +def...
dwavesystems__dimod-350
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "dimod/__init__.py" }, { "changes": { "added_entities": [ "dimod/sampleset.py:concatenate", "dimod/sampleset.py:_iter_records", ...
dwavesystems/dimod
5c8576958320c247750111e6936958412bad7acb
Ability to 'stack' multiple responses **Application** There are many cases when combining groups of samples (from different samplers say) is useful, however most of the naive approaches are inefficient. We also want to handle edge-cases like differently-ordered labels. **Proposed Solution** One of: Pattern A: ...
diff --git a/dimod/__init__.py b/dimod/__init__.py index 6ea87623..e90ffac4 100644 --- a/dimod/__init__.py +++ b/dimod/__init__.py @@ -48,7 +48,7 @@ import dimod.higherorder from dimod.package_info import __version__, __author__, __authoremail__, __description__ -from dimod.sampleset import * +from dimod.sampleset...
dwavesystems__dimod-377
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/core/sampler.py:Sampler.sample", "dimod/core/sampler.py:Sampler.sample_ising", "dimod/core/sampler.py:Sampler.sample_qubo" ], "edited_modules": [ "dimod/core/sa...
dwavesystems/dimod
91938b74aac2dff4fdcc6dc55bf3b710465799ae
Don't change vartype unnecessarily in Sampler.sample **Application** The dimod `Sampler` abc allows the user to implement one of `.sample`, `.sample_ising`, or `.sample_qubo` for it to work. It does this by using a figure-8 loop of sample calls, see: https://github.com/dwavesystems/dimod/blob/378b03a1df067ae4c12249bf...
diff --git a/dimod/core/sampler.py b/dimod/core/sampler.py index 19a8d82f..6df4f0b8 100644 --- a/dimod/core/sampler.py +++ b/dimod/core/sampler.py @@ -135,16 +135,32 @@ class Sampler: def sample(self, bqm, **parameters): """Samples from a binary quadratic model using an implemented sample method. ...
dwavesystems__dimod-383
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel.normalize" ], "edited_modules": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel" ] }, "file": "dimod/binary...
dwavesystems/dimod
72188236007a1225294a994f9684560de657d865
Include option to compress samples into column of lists in `to_pandas_dataframe` By default, `to_pandas_dataframe` returns something like ```python samples.to_pandas_dataframe() a b c energy num_occurrences 0 -1 1 -1 -0.5 1 1 -1 -1 1 -0.5 ...
diff --git a/dimod/binary_quadratic_model.py b/dimod/binary_quadratic_model.py index 77f60957..86003d9a 100644 --- a/dimod/binary_quadratic_model.py +++ b/dimod/binary_quadratic_model.py @@ -946,6 +946,16 @@ class BinaryQuadraticModel(abc.Sized, abc.Container, abc.Iterable): return 0, 0 re...
dwavesystems__dimod-384
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel.to_serializable" ], "edited_modules": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel" ] }, "file": "dimod/...
dwavesystems/dimod
cbcea2e9809fa2016e5728cf6d170db7f02e2712
`bqm.to_serializable(use_bytes=True)` produces an offset with numpy type **Description** The offset value produced by `bqm.to_serializable(use_bytes=True)` is a numpy type, which is not generally serializable. **Steps To Reproduce** ```python >>> bqm = dimod.BinaryQuadraticModel.from_ising({}, {"ab": 1}) >>> typ...
diff --git a/dimod/binary_quadratic_model.py b/dimod/binary_quadratic_model.py index 86003d9a..55f1ecb2 100644 --- a/dimod/binary_quadratic_model.py +++ b/dimod/binary_quadratic_model.py @@ -1656,13 +1656,24 @@ class BinaryQuadraticModel(abc.Sized, abc.Container, abc.Iterable): return coo.load(obj, cls=cls, ...
dwavesystems__dimod-387
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel.normalize" ], "edited_modules": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel" ] }, "file": "dimod/binary...
dwavesystems/dimod
72188236007a1225294a994f9684560de657d865
bqm.normalize does not incorporate ignored variables/interactions for scalar normalize method of BinaryQuadraticModel should incorporate ignored variables/interactions when determining the scalar for scaling.
diff --git a/dimod/binary_quadratic_model.py b/dimod/binary_quadratic_model.py index 77f60957..86003d9a 100644 --- a/dimod/binary_quadratic_model.py +++ b/dimod/binary_quadratic_model.py @@ -946,6 +946,16 @@ class BinaryQuadraticModel(abc.Sized, abc.Container, abc.Iterable): return 0, 0 re...
dwavesystems__dimod-398
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/sampleset.py:as_samples", "dimod/sampleset.py:SampleSet.from_samples" ], "edited_modules": [ "dimod/sampleset.py:as_samples", "dimod/sampleset.py:SampleSet" ...
dwavesystems/dimod
15e6f93638b937156e8f0fff008c3b63a451aa45
Consistent variable order for integer-labelled responses **Application** When using index labels, it would be nice if the samples in `response.record.sample` where column-ordered by index. This would save needing to do things like `response.record.sample[label_to_idx[0]]`. There is a small performance benefit (skippin...
diff --git a/dimod/compatibility23.py b/dimod/compatibility23.py index d60f2d00..d5dd2e5c 100644 --- a/dimod/compatibility23.py +++ b/dimod/compatibility23.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# ==========================...
dwavesystems__dimod-399
[ { "changes": { "added_entities": [ "dimod/sampleset.py:SampleSet.truncate" ], "added_modules": null, "edited_entities": [ "dimod/sampleset.py:SampleSet.aggregate" ], "edited_modules": [ "dimod/sampleset.py:SampleSet" ] }, "file": "dimod/s...
dwavesystems/dimod
8e7a2b51c6add6c7885b2e62e280b0ab20bdc53d
SampleSet.trim or similar Something like ``` samples.trim(n, 'energy') ``` which would return a new sampleset containing the first n rows of the sampleset ordered by energy. We could then do things like ``` samples.aggregate().trim(n) ```
diff --git a/dimod/sampleset.py b/dimod/sampleset.py index f93633af..87179821 100644 --- a/dimod/sampleset.py +++ b/dimod/sampleset.py @@ -912,7 +912,51 @@ class SampleSet(abc.Iterable, abc.Sized): # dev note: we don't check the energies as they should be the same # for individual samples - r...
dwavesystems__dimod-415
[ { "changes": { "added_entities": [ "dimod/sampleset.py:SampleSet.data_vectors" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "dimod/sampleset.py:SampleSet" ] }, "file": "dimod/sampleset.py" } ]
dwavesystems/dimod
4bdd07c68b6d6b127e21266a8920c644ccbc405d
`SampleSet.data_vectors` or similar The `Reponse` object included an attribute `Response.data_vectors` that was deprecated and then removed. However, it seems that this was a very useful feature that a lot of users used. *Additional Context* It was originally removed because we changed the way we stored data vector...
diff --git a/dimod/sampleset.py b/dimod/sampleset.py index 87179821..250bcd90 100644 --- a/dimod/sampleset.py +++ b/dimod/sampleset.py @@ -559,6 +559,32 @@ class SampleSet(abc.Iterable, abc.Sized): # Properties ############################################################################################### +...
dwavesystems__dimod-426
[ { "changes": { "added_entities": [ "dimod/decorators.py:_is_integer" ], "added_modules": [ "dimod/decorators.py:_is_integer" ], "edited_entities": [ "dimod/decorators.py:graph_argument" ], "edited_modules": [ "dimod/decorators.py:graph_ar...
dwavesystems/dimod
dd76c080728d5480c2e11b2a50c2443adbfdcd88
Problem generators should accept seeds **Application** I love the problem generators in `dimod.generators`. It would be great if they accepted a seed so they could be reproducible! **Proposed Solution** Accept a `seed` parameter as an int, and pass that into `random.Random()`.
diff --git a/dimod/decorators.py b/dimod/decorators.py index 21aee399..7355bb1e 100644 --- a/dimod/decorators.py +++ b/dimod/decorators.py @@ -248,11 +248,41 @@ def vartype_argument(*arg_names): return _vartype_arg -def graph_argument(*arg_names): +def _is_integer(a): + if isinstance(a, integer_types): + ...
dwavesystems__dimod-448
[ { "changes": { "added_entities": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel.from_networkx_graph" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel" ] }, "file": "di...
dwavesystems/dimod
b239e52b628f784ec08b3646ad46243b45f7b60e
BQM.from_networkx() It would be nice to have `BQM.from_networkx()` factory (as a dual to `BQM.to_networkx`).
diff --git a/dimod/binary_quadratic_model.py b/dimod/binary_quadratic_model.py index 672ee375..a8895ba2 100644 --- a/dimod/binary_quadratic_model.py +++ b/dimod/binary_quadratic_model.py @@ -1851,9 +1851,10 @@ class BinaryQuadraticModel(abc.Sized, abc.Container, abc.Iterable): """Convert a binary quadratic mod...
dwavesystems__dimod-459
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/sampleset.py:SampleSet.from_serializable" ], "edited_modules": [ "dimod/sampleset.py:SampleSet" ] }, "file": "dimod/sampleset.py" } ]
dwavesystems/dimod
8f6895d935af629edd492c86b2d31ea529997e27
SampleSet from_serializable not handling "tuple" variable labels **Description** Common methods for serialization (json, bson) will convert tuples to lists. When using these with the BQM serialization, everything works well because when deserializing, variable labels that are lists get converted to tuples. However, th...
diff --git a/dimod/sampleset.py b/dimod/sampleset.py index 03d7ca95..40c050d4 100644 --- a/dimod/sampleset.py +++ b/dimod/sampleset.py @@ -1307,7 +1307,8 @@ class SampleSet(abc.Iterable, abc.Sized): if vartype is Vartype.SPIN: sample = np.asarray(2*sample-1, dtype=dtype) - variables = obj...
dwavesystems__dimod-464
[ { "changes": { "added_entities": [ "dimod/sampleset.py:SampleSet.slice" ], "added_modules": null, "edited_entities": [ "dimod/sampleset.py:SampleSet.truncate" ], "edited_modules": [ "dimod/sampleset.py:SampleSet" ] }, "file": "dimod/sampl...
dwavesystems/dimod
e33ca5045e31ee2d9d58515f017fb6be5276cd8e
Add SampleSet.slice() Modeled after Python's `slice`, we could make picking top/bottom/middle n samples easier. `SampleSet.truncate(n)` could be expressed as `SampleSet.slice(n)`. Top `n` samples by energy would be `SampleSet.slice(-n, None)`. Reversing the sample set, according to a custom `weirdness` vector ...
diff --git a/dimod/sampleset.py b/dimod/sampleset.py index 40c050d4..b0f3d75d 100644 --- a/dimod/sampleset.py +++ b/dimod/sampleset.py @@ -1150,8 +1150,8 @@ class SampleSet(abc.Iterable, abc.Sized): sorted_by (str/None, optional, default='energy'): Selects the record field used to sort t...
dwavesystems__dimod-465
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "dimod/generators/__init__.py" }, { "changes": { "added_entities": [ "dimod/generators/random.py:ran_r" ], "added_modules": [...
dwavesystems/dimod
e33ca5045e31ee2d9d58515f017fb6be5276cd8e
SampleSet.aggregate() does not preserve order, destroys equality test Consider (dimod v0.8.10): ``` import dimod bqm = dimod.BinaryQuadraticModel({}, {'ab': 1}, 0, dimod.SPIN) ss1 = dimod.SampleSet.from_samples_bqm([{'a': 1, 'b': -1}, {'a': -1, 'b': 1}], bqm) ss2 = ss1.aggregate() ``` then we have: ``` >>> ss1...
diff --git a/dimod/generators/__init__.py b/dimod/generators/__init__.py index b6548fd6..b2f27548 100644 --- a/dimod/generators/__init__.py +++ b/dimod/generators/__init__.py @@ -16,4 +16,4 @@ from dimod.generators.chimera import chimera_anticluster from dimod.generators.constraints import combinations from dimod.ge...
dwavesystems__dimod-469
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "dimod/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/binary_quadr...
dwavesystems/dimod
b45a23d8230179282adb2890988e36d9feb4b672
as_vartype function This would fill a similar role to `dimod.decorators.vartype_argument` in that it would cast `'SPIN'`, `{-1, 1}`, etc. to the appropriate vartype.
diff --git a/dimod/__init__.py b/dimod/__init__.py index 6f3e3e87..114c9886 100644 --- a/dimod/__init__.py +++ b/dimod/__init__.py @@ -58,5 +58,4 @@ import dimod.response from dimod.utilities import * import dimod.utilities -from dimod.vartypes import * -import dimod.vartypes +from dimod.vartypes import as_vartype,...
dwavesystems__dimod-470
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel.variables" ], "edited_modules": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel" ] }, "file": "dimod/binary...
dwavesystems/dimod
b45a23d8230179282adb2890988e36d9feb4b672
Document BQM.variables There is currently no documentation for the `BQM.variables` attribute
diff --git a/dimod/binary_quadratic_model.py b/dimod/binary_quadratic_model.py index a8895ba2..8fde1d9c 100644 --- a/dimod/binary_quadratic_model.py +++ b/dimod/binary_quadratic_model.py @@ -57,7 +57,7 @@ from numbers import Number import numpy as np -from six import itervalues, iteritems, iterkeys, PY2 +from six ...
dwavesystems__dimod-471
[ { "changes": { "added_entities": [ "dimod/sampleset.py:SampleSet.slice" ], "added_modules": null, "edited_entities": [ "dimod/sampleset.py:SampleSet.truncate" ], "edited_modules": [ "dimod/sampleset.py:SampleSet" ] }, "file": "dimod/sampl...
dwavesystems/dimod
b45a23d8230179282adb2890988e36d9feb4b672
Inconsistent behavior in `BQM.relabel_variables` and `SampleSet.relabel_variables` **Description** If variable labels that were not present in the original BQM are passed into `BQM.relabel_variables`, then they are ignored (which seems reasonable to me). However, `SampleSet.relabel_variables` will raise an error in th...
diff --git a/dimod/sampleset.py b/dimod/sampleset.py index 48f0ba39..29e3ebba 100644 --- a/dimod/sampleset.py +++ b/dimod/sampleset.py @@ -1154,8 +1154,8 @@ class SampleSet(abc.Iterable, abc.Sized): sorted_by (str/None, optional, default='energy'): Selects the record field used to sort t...
dwavesystems__dimod-488
[ { "changes": { "added_entities": [ "dimod/utilities.py:child_structure_dfs" ], "added_modules": [ "dimod/utilities.py:child_structure_dfs" ], "edited_entities": null, "edited_modules": null }, "file": "dimod/utilities.py" } ]
dwavesystems/dimod
1f6e29b84db61ffd337abc14e982ed022b3391b5
SpinTransform should propagate Structured inheritance
diff --git a/dimod/core/structured.py b/dimod/core/structured.py index 86ca0560..5a7acbc2 100644 --- a/dimod/core/structured.py +++ b/dimod/core/structured.py @@ -117,7 +117,7 @@ class Structured: def structure(self): """Structure of the structured sampler formatted as a :class:`~collections.name...
dwavesystems__dimod-497
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel.to_serializable" ], "edited_modules": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel" ] }, "file": "dimod/...
dwavesystems/dimod
4920d4e490a40ae69fafb4709ff8cc91059feb79
sampleset.to_serializable to check variable indices when using to_serializable, seems like it doesn't check the type of variable indices. if np.int64 is sent it as variable indices, sampleset.to_serializable() remains not bson compatible. would be nice if we can check that and convert during the process
diff --git a/dimod/binary_quadratic_model.py b/dimod/binary_quadratic_model.py index be17433b..1288c6ef 100644 --- a/dimod/binary_quadratic_model.py +++ b/dimod/binary_quadratic_model.py @@ -53,7 +53,7 @@ try: except ImportError: import collections as abc -from numbers import Number +from numbers import Integra...
dwavesystems__dimod-527
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel.copy" ], "edited_modules": [ "dimod/binary_quadratic_model.py:BinaryQuadraticModel" ] }, "file": "dimod/binary_quad...
dwavesystems/dimod
f67f48677202adffea7a5484e021e2599177b238
deepcopy(bqm) fails for immutable BQMs ``` $ python Python 3.6.4 (default, May 29 2018, 20:56:16) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import dimod, copy >>> bqm = dimod.BQM.from_ising({'a': 1}, {}) >>> copy.copy(bqm) BinaryQuadraticModel({'a'...
diff --git a/dimod/binary_quadratic_model.py b/dimod/binary_quadratic_model.py index 63ba7614..161b664b 100644 --- a/dimod/binary_quadratic_model.py +++ b/dimod/binary_quadratic_model.py @@ -1458,7 +1458,13 @@ class BinaryQuadraticModel(abc.Sized, abc.Container, abc.Iterable): """ # new objects are ...
dwavesystems__dwave-cloud-client-103
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/client.py:Client.from_config" ], "edited_modules": [ "dwave/cloud/client.py:Client" ] }, "file": "dwave/cloud/client.py" }, { "changes": { "ad...
dwavesystems/dwave-cloud-client
a81beae09f37190af2ae487012b7abdc24e469cc
Fix legacy config load - make it more robust (fix things like #19) - follow the same logic the new config has: - load from file, override with environment, override with arguments, - instead of: if minimal set of required variables is present in environment (or via arguments), use them and skip the file load - ...
diff --git a/dwave/cloud/client.py b/dwave/cloud/client.py index a0390e0..62d9e91 100644 --- a/dwave/cloud/client.py +++ b/dwave/cloud/client.py @@ -152,31 +152,19 @@ class Client(object): # try loading configuration from a preferred new config subsystem # (`./dwave.conf`, `~/.config/dwave/dwave.con...
dwavesystems__dwave-cloud-client-126
[ { "changes": { "added_entities": [ "dwave/cloud/cli.py:inspect_config" ], "added_modules": [ "dwave/cloud/cli.py:inspect_config" ], "edited_entities": null, "edited_modules": null }, "file": "dwave/cloud/cli.py" }, { "changes": { "added_e...
dwavesystems/dwave-cloud-client
31e170e1fc5df92bb7d57a45825379814c1aab84
Add config debug/show feature to dwave CLI
diff --git a/dwave/cloud/cli.py b/dwave/cloud/cli.py index d2a1e95..b4b37d9 100644 --- a/dwave/cloud/cli.py +++ b/dwave/cloud/cli.py @@ -8,9 +8,10 @@ from dwave.cloud import Client from dwave.cloud.utils import readline_input from dwave.cloud.package_info import __title__, __version__ from dwave.cloud.exceptions imp...
dwavesystems__dwave-cloud-client-289
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/client.py:Client.get_solvers" ], "edited_modules": [ "dwave/cloud/client.py:Client" ] }, "file": "dwave/cloud/client.py" } ]
dwavesystems/dwave-cloud-client
307046b5423cf8279c6c982ddc57c1bd272bf0d0
Solver filtering failing for some ops with non-existing properties For example, relational and set operators will fail when applied to a property that a particular solver does not have: ``` $ dwave solvers -s '{"max_anneal_schedule_points__gt": 2}' Traceback (most recent call last): File "/home/radomir/work/dwave...
diff --git a/dwave/cloud/client.py b/dwave/cloud/client.py index bf97812..7aa7d1e 100644 --- a/dwave/cloud/client.py +++ b/dwave/cloud/client.py @@ -53,7 +53,7 @@ import warnings import operator import collections from itertools import chain -from functools import partial +from functools import partial, wraps fro...
dwavesystems__dwave-cloud-client-307
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/client.py:Client.get_solvers" ], "edited_modules": [ "dwave/cloud/client.py:Client" ] }, "file": "dwave/cloud/client.py" } ]
dwavesystems/dwave-cloud-client
71aae7acfcabac87d0fcd54032307fd02dc4ae50
Support nested property dictionaries in solver filtering kwargs To select solvers with, e.g. `{"topology": {"shape": "chimera"}}` property, we'll say: ``` client.get_solvers(topology__shape="chimera") ``` or ``` client.get_solvers(topology__shape__eq="chimera") ```
diff --git a/dwave/cloud/client.py b/dwave/cloud/client.py index 7008cd9..d468257 100644 --- a/dwave/cloud/client.py +++ b/dwave/cloud/client.py @@ -602,9 +602,10 @@ class Client(object): See `Filtering forms` and `Operators` below. Solver filters are defined, similarly to Django QuerySet fi...
dwavesystems__dwave-cloud-client-309
[ { "changes": { "added_entities": [ "dwave/cloud/solver.py:Solver.lower_noise" ], "added_modules": null, "edited_entities": [ "dwave/cloud/solver.py:Solver.__init__" ], "edited_modules": [ "dwave/cloud/solver.py:Solver" ] }, "file": "dwave...
dwavesystems/dwave-cloud-client
67a993249845daa8a794d601be779b97c30296f6
Expose lower_noise solver property Create a derived property based on solver `tags`.
diff --git a/dwave/cloud/solver.py b/dwave/cloud/solver.py index 35b6221..d04eeec 100644 --- a/dwave/cloud/solver.py +++ b/dwave/cloud/solver.py @@ -143,7 +143,8 @@ class Solver(object): # Derived solver properties (not present in solver data properties dict) self.derived_properties = { - ...
dwavesystems__dwave-cloud-client-325
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/client.py:Client._handle_problem_status", "dwave/cloud/client.py:Client._do_poll_problems" ], "edited_modules": [ "dwave/cloud/client.py:Client" ] }, ...
dwavesystems/dwave-cloud-client
0364541298402a481562060759d3716abd220c6a
Assume 5xx responses during problem polling are transient errors, don't abort polling Although this can be incorrect, as a good first approximation we can assume server-side errors (5xx) are temporary, meaning we should not stop polling, but rather retry later. At the same time we're assuming client-side errors (4xx...
diff --git a/dwave/cloud/client.py b/dwave/cloud/client.py index ff37d7e..886eb16 100644 --- a/dwave/cloud/client.py +++ b/dwave/cloud/client.py @@ -1030,18 +1030,22 @@ class Client(object): def _handle_problem_status(self, message, future): """Handle the results of a problem submission or results request...
dwavesystems__dwave-cloud-client-335
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/client.py:Client.from_config", "dwave/cloud/client.py:Client.__init__", "dwave/cloud/client.py:Client.create_session" ], "edited_modules": [ "dwave/cloud/...
dwavesystems/dwave-cloud-client
ee8aae92ac10be096ed1a34cec384afcc0c6e5a8
Add support for custom headers It's useful during development and testing to be able to pass-in a custom HTTP header in every API call. Add support for `headers` config parameter (file, constructor) and `DWAVE_API_HEADERS` environment variable.
diff --git a/dwave/cloud/client.py b/dwave/cloud/client.py index b13cb8e..4055220 100644 --- a/dwave/cloud/client.py +++ b/dwave/cloud/client.py @@ -114,6 +114,9 @@ class Client(object): connection_close (bool, default=False): Force HTTP(S) connection close after each request. + headers (...
dwavesystems__dwave-cloud-client-338
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/cli.py:_ping" ], "edited_modules": [ "dwave/cloud/cli.py:_ping" ] }, "file": "dwave/cloud/cli.py" }, { "changes": { "added_entities": null, ...
dwavesystems/dwave-cloud-client
a983749f8ce208eb45c4f121bfff6a2b2e31ee63
Ping should respect solver's graph Currently, a fixed Ising problem `({0: 1}, {})` is always submitted, obviously ignoring the actual solver's graph. Note that `sample --random-problem` respects the graph structure.
diff --git a/dwave/cloud/cli.py b/dwave/cloud/cli.py index f11bdb2..af6ecc7 100644 --- a/dwave/cloud/cli.py +++ b/dwave/cloud/cli.py @@ -234,11 +234,18 @@ def _ping(config_file, profile, solver_def, request_timeout, polling_timeout, ou except Exception as e: raise CLIError("Unexpected error while fetching...
dwavesystems__dwave-cloud-client-386
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/config.py:load_config_from_files" ], "edited_modules": [ "dwave/cloud/config.py:load_config_from_files" ] }, "file": "dwave/cloud/config.py" } ]
dwavesystems/dwave-cloud-client
50f49313de3f12d6b7bd86d056790cae8a5e1533
Home-Based Config Paths It seems that at least on OS X the config file paths cannot include home-based paths. For example, `~/foo/my.conf` or `$HOME/foo/my.conf`. If it is easy to support these it would provide some added convenience.
diff --git a/dwave/cloud/config.py b/dwave/cloud/config.py index 9067215..87971a4 100644 --- a/dwave/cloud/config.py +++ b/dwave/cloud/config.py @@ -462,6 +462,7 @@ def load_config_from_files(filenames=None): config = configparser.ConfigParser(default_section="defaults") for filename in filenames: tr...
dwavesystems__dwave-cloud-client-388
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "docs/conf.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/cli.py:uplo...
dwavesystems/dwave-cloud-client
3b360a966e36824e69dae0bb984364bd9ce595cd
Client.from_config() inconsistency for legacy .dwrc behavior legacy_load_config() says, "Assuming the new config file dwave.conf is not found... ``` >>> client = dwave.cloud.Client.from_config(profile='profile-b') # Will try to connect with the url `https://two.com` and the token `token-two`."" ``` For when user...
diff --git a/docs/conf.py b/docs/conf.py index 5544722..0cdd555 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -102,7 +102,9 @@ InstanceAttributeDocumenter.add_directive_header = iad_add_directive_header # Link to Python standard lib objects -intersphinx_mapping = {'python': ('https://docs.python.org/3', None), -...
dwavesystems__dwave-cloud-client-397
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/solver.py:BaseSolver.qpu", "dwave/cloud/solver.py:BaseSolver.software", "dwave/cloud/solver.py:BaseSolver.hybrid" ], "edited_modules": [ "dwave/cloud/solv...
dwavesystems/dwave-cloud-client
a178c2f40f3d107c5b7e2a7ae43602fb24046016
Add support for solvers without `category` property In [`0.7.3`](https://github.com/dwavesystems/dwave-cloud-client/releases/tag/0.7.3)+ we use solver's `category` property to filter by type. Since some old solvers are missing this property, we'll have to partially revert a nice clean-up done in #379 in order to fal...
diff --git a/dwave/cloud/solver.py b/dwave/cloud/solver.py index da11b7f..762658a 100644 --- a/dwave/cloud/solver.py +++ b/dwave/cloud/solver.py @@ -204,17 +204,35 @@ class BaseSolver(object): @property def qpu(self): "Is this a QPU-based solver?" - return self.properties.get('category', '').l...
dwavesystems__dwave-cloud-client-404
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/client.py:Client._upload_multipart_part", "dwave/cloud/client.py:Client._upload_part_worker", "dwave/cloud/client.py:Client._upload_problem_worker" ], "edited_mod...
dwavesystems/dwave-cloud-client
88e14e9b745957569d86ca8d8fcd1461ff7101b9
Upload part worker does not recover from failures to correctly retry upload Individual part problem upload should be retried 2 times in case the upload fails due to any unhandled exception (e.g. SAPI returns `502 Bad Gateway` during overload). This is achieved with the `retried` decorator. https://github.com/dwavesy...
diff --git a/dwave/cloud/client.py b/dwave/cloud/client.py index 05bd128..8d17147 100644 --- a/dwave/cloud/client.py +++ b/dwave/cloud/client.py @@ -1668,7 +1668,7 @@ class Client(object): @staticmethod @retried(_UPLOAD_PART_RETRIES, backoff=_UPLOAD_RETRIES_BACKOFF) - def _upload_multipart_part(session, ...
dwavesystems__dwave-cloud-client-405
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/client.py:Client.get_solver" ], "edited_modules": [ "dwave/cloud/client.py:Client" ] }, "file": "dwave/cloud/client.py" } ]
dwavesystems/dwave-cloud-client
88e14e9b745957569d86ca8d8fcd1461ff7101b9
Fix docs for order_by In [`get_solver()`](https://github.com/dwavesystems/dwave-cloud-client/blob/a178c2f40f3d107c5b7e2a7ae43602fb24046016/dwave/cloud/client.py#L1055). Unexpected behavior in order_by ``` >>> from dwave.cloud import Client >>> client = Client.from_config(solver=dict(qpu=True)) >>> client.get_solver(...
diff --git a/dwave/cloud/client.py b/dwave/cloud/client.py index 05bd128..1c2df0d 100644 --- a/dwave/cloud/client.py +++ b/dwave/cloud/client.py @@ -697,10 +697,10 @@ class Client(object): Force refresh of cached list of solvers/properties. order_by (callable/str/None, default='avg_load'...
dwavesystems__dwave-cloud-client-413
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/coders.py:encode_problem_as_qp", "dwave/cloud/coders.py:decode_qp", "dwave/cloud/coders.py:decode_qp_numpy" ], "edited_modules": [ "dwave/cloud/coders.py:...
dwavesystems/dwave-cloud-client
45e4d1d4f187b10495e38d47478f2c8d87514434
`StructuredSolver.sample_bqm()` ignores energy offset `StructuredSolver.sample_bqm(bqm)` submits linear/quadratic coefficients to the QPU, but it drops off the constant energy offset (if it exists). SAPI doesn't accept energy offset, but `sample_bqm` should apply it to QPU results, if it was provided. This means we ...
diff --git a/dwave/cloud/coders.py b/dwave/cloud/coders.py index 62475fd..7d498ab 100644 --- a/dwave/cloud/coders.py +++ b/dwave/cloud/coders.py @@ -24,7 +24,8 @@ from dwave.cloud.utils import ( __all__ = ['encode_problem_as_qp', 'decode_qp', 'decode_qp_numpy'] -def encode_problem_as_qp(solver, linear, quadratic, ...
dwavesystems__dwave-cloud-client-417
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/client.py:Client.get_solver" ], "edited_modules": [ "dwave/cloud/client.py:Client" ] }, "file": "dwave/cloud/client.py" } ]
dwavesystems/dwave-cloud-client
b0b22210be5c5cb516166d9f9425759392b87b11
Allow `order_by` to be part of solver definition dict, again #405 broke the original intentional behavior, where `order_by` could have been specified as part of the solver definition, e.g.: ``` client = Client.from_config(solver=dict(qpu=True, order_by='-num_active_qubits')) ```
diff --git a/dwave/cloud/client.py b/dwave/cloud/client.py index a660dab..1c7b7e0 100644 --- a/dwave/cloud/client.py +++ b/dwave/cloud/client.py @@ -1041,7 +1041,7 @@ class Client(object): warnings.warn("'solvers' is deprecated in favor of 'get_solvers'.", DeprecationWarning) return self.get_solvers(r...
dwavesystems__dwave-cloud-client-421
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/utils.py:user_agent" ], "edited_modules": [ "dwave/cloud/utils.py:user_agent" ] }, "file": "dwave/cloud/utils.py" } ]
dwavesystems/dwave-cloud-client
c8ec9a195a363aa6ddb0d7f1e56729b9d587d2f9
User-Agent is missing dwave-cloud-client version The bug was introduced in 331c37b67, and released in [0.7.5](https://github.com/dwavesystems/dwave-cloud-client/compare/0.7.4...0.7.5), so it affects 0.7.5 and 0.7.6.
diff --git a/dwave/cloud/utils.py b/dwave/cloud/utils.py index fbc82ad..41a026c 100644 --- a/dwave/cloud/utils.py +++ b/dwave/cloud/utils.py @@ -321,13 +321,13 @@ def user_agent(name=None, version=None): if name and version: tags.append((name, version)) - tags = [ + tags.extend([ ("python...
dwavesystems__dwave-cloud-client-429
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/client.py:Client.get_solver" ], "edited_modules": [ "dwave/cloud/client.py:Client" ] }, "file": "dwave/cloud/client.py" } ]
dwavesystems/dwave-cloud-client
405c1d1642a966b1f5e4e56c818f070715b7b4fb
Client.get_solver mutates instance defaults ``` defaults = dict(solver=dict(order_by='id')) with Client.from_config(defaults=defaults) as client: assert 'order_by' in client.defaults['solver'] solver = client.get_solver() assert 'order_by' not in client.defaults['solver'] ```
diff --git a/dwave/cloud/client.py b/dwave/cloud/client.py index dd68167..abace57 100644 --- a/dwave/cloud/client.py +++ b/dwave/cloud/client.py @@ -1068,11 +1068,13 @@ class Client(object): # in absence of other filters, config/env solver filters/name are used if not filters and self.default_solver...
dwavesystems__dwave-cloud-client-431
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/client.py:Client.from_config" ], "edited_modules": [ "dwave/cloud/client.py:Client" ] }, "file": "dwave/cloud/client.py" } ]
dwavesystems/dwave-cloud-client
5deb326e53637b5cf8a9b1d7f32ef46207faa29a
Compatibility break in from_config for None kwargs Prior to 0.8.0, kwargs with value `None` did not overwrite the file/env config. We should restore that as a default behavior, as it easily propagates up to libraries that call `Client.from_config(**kwargs)`.
diff --git a/dwave/cloud/client.py b/dwave/cloud/client.py index abace57..baf8341 100644 --- a/dwave/cloud/client.py +++ b/dwave/cloud/client.py @@ -283,7 +283,8 @@ class Client(object): logger.debug("File/env config loaded: %r", config) # manual config override with client constructor options - ...
dwavesystems__dwave-cloud-client-434
[ { "changes": { "added_entities": [ "dwave/cloud/client.py:Client._parse_multipart_upload_response" ], "added_modules": null, "edited_entities": [ "dwave/cloud/client.py:Client._initiate_multipart_upload", "dwave/cloud/client.py:Client._upload_multipart_part", ...
dwavesystems/dwave-cloud-client
846dca27ea616377c3e82e4d1c2f7e65caea699a
Bubble up SAPI error messages during all stages of multipart upload For example, if a too big upload size is requested (during multipart upload initialize), SAPI responds with: ``` {"error_code": 400, "error_msg": "The proposed upload is bigger than the maximum upload allowed of 42949672960"} ``` but the exception ...
diff --git a/dwave/cloud/client.py b/dwave/cloud/client.py index baf8341..4744bf9 100644 --- a/dwave/cloud/client.py +++ b/dwave/cloud/client.py @@ -44,12 +44,12 @@ import sys import time import json import copy +import queue import logging -import threading -import requests +import inspect import warnings import...
dwavesystems__dwave-cloud-client-441
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "docs/conf.py" }, { "changes": { "added_entities": [ "dwave/cloud/client.py:Client._sapi_request" ], "added_modules": null, ...
dwavesystems/dwave-cloud-client
4e9e6ef8edc78cc397c51ce8d8eaf00fc39c55f7
Retry SAPI requests whenever possible We can (and should) easily retry: - idempotent requests - socket connect errors (including connect timeout) - dns-caused errors We should not retry on: - non-idempotent requests (like problem submit). Maybe allow some requests to be explicitly retried (like initiate problem ...
diff --git a/docs/conf.py b/docs/conf.py index 0cdd555..3949505 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -105,6 +105,7 @@ InstanceAttributeDocumenter.add_directive_header = iad_add_directive_header intersphinx_mapping = { 'python': ('https://docs.python.org/3', None), 'numpy': ('https://numpy.org/doc/...
dwavesystems__dwave-cloud-client-451
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "dwave/cloud/computation.py:Future.wait_sampleset" ], "edited_modules": [ "dwave/cloud/computation.py:Future" ] }, "file": "dwave/cloud/computation.py" } ]
dwavesystems/dwave-cloud-client
7dd9b7b5856393ec3572603439b7ef061a98c71a
Unstructured solvers do not update sampleset with general problem data We should add `problem_id` and `problem_label` to `sampleset.info` returned.
diff --git a/dwave/cloud/computation.py b/dwave/cloud/computation.py index fd5e0e7..8c6000f 100644 --- a/dwave/cloud/computation.py +++ b/dwave/cloud/computation.py @@ -772,9 +772,19 @@ class Future(object): def wait_sampleset(self): """Blocking sampleset getter.""" + # blocking result get ...