Dwave-ocean-sdk

Latest version: v8.3.0

Safety actively analyzes 723359 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 16 of 33

0.13.4

New Features

- Add `output_file` parameter to `dwave.cloud.utils.logging.configure_logging()` to simplify logging to a file.

- Add `dwave.cloud.api.models.ProblemJob.from_info()` helper factory method that constructs a problem job model from problem info model.

- Allow `dwave.cloud.api.resources.Problems.submit_problem()` to accept a problem described by a `ProblemJob` model, with individual attributes optionally modified by keyword arguments.

0.13.3

New Features

- Add `PayloadCompressingSession`, a `requests.Session` subclass that adds support for payload compression on the fly to `dwave.cloud.api.client.DWaveAPIClient`. See [\654](https://github.com/dwavesystems/dwave-cloud-client/issues/654).

- Support compression of QPU problem data on upload in `SolverAPIClient` and `api.Problems` via `compress_qpu_problem_data` config option.

- More robust `Client.close()`.

Client use after close is now disabled. An attempt to submit a problem, poll for a status, or download an answer will now result in an `UseAfterCloseError` exception.

Also, solvers and computations now only weakly reference the client, so they don't block client resources cleanup.

See [\217](https://github.com/dwavesystems/dwave-cloud-client/issues/217).

- Disable client use while `Client.close()` is in progress by failing with `UseAfterCloseError`. Also, make sure the close operation is thread-safe. A follow-up to [\680](https://github.com/dwavesystems/dwave-cloud-client/pull/680).

Upgrade Notes

- Remove `Client.session`, an undocumented and unused client attribute. If still needed, can be replaced with `Client.create_session()`.

0.13.2

New Features

- Add Python 3.13 support.

- Add `--raw` output mode to get-token CLI commands. See [\598](https://github.com/dwavesystems/dwave-cloud-client/issues/598).

Upgrade Notes

- Remove support for dimod 0.9.x. Upgrade dimod to 0.10.0+. See [\595](https://github.com/dwavesystems/dwave-cloud-client/issues/595).

- Upgrade your python to 3.9+. We no longer support python 3.8 and below.

Deprecation Notes

- Client utility function `dwave.cloud.coders.bqm_as_file()` is deprecated in favor of `dimod.BQM.to_file()` (available in dimod 0.10.0+) and will be removed in dwave-cloud-client 0.15.0.

Bug Fixes

- Update sample set creation in `dwave.cloud.computation.Future` to support dimod 0.12.18+. Previously, `wait_id()` method used to be added to the `from_future`-created sample sets in the cloud-client, and now the `SampleSet` interface propagates `wait_id` from the future by default. See [dimod\1392](https://github.com/dwavesystems/dimod/issues/1392) and [dwave-system\#540](https://github.com/dwavesystems/dwave-system/issues/540).

0.13.1

New Features

- Configuration constants like default region and default API endpoints are now available in a new module `dwave.cloud.config.constants`.

Configuration-related exceptions are now available in a new module `dwave.cloud.config.exceptions`.

`dwave.cloud.config` module (with submodules) is now free from dependencies on other submodules, and it's safe to be imported in any cloud-client context.

Deprecation Notes

- Use of `dwave.cloud.api.constants` to access default configuration constants is deprecated in `dwave-cloud-client==0.13.1` in favor of a new config module `dwave.cloud.config.constants`, and will be disabled in `dwave-cloud-client==0.14.0`.

Bug Fixes

- Fix a circular import error. See [\669](https://github.com/dwavesystems/dwave-cloud-client/issues/669).


Package versions


dimod==0.12.17
dwave-cloud-client==0.13.1
dwave-gate==0.3.2
dwave-greedy==0.3.0
dwave-hybrid==0.6.12
dwave-inspector==0.5.1
dwave-neal==0.6.0
dwave-networkx==0.8.15
dwave-optimization==0.3.0
dwave-preprocessing==0.6.6
dwave-samplers==1.3.0
dwave-system==1.26.0
dwave-tabu==0.5.0
dwavebinarycsp==0.3.0
minorminer==0.2.15
penaltymodel==1.1.0

0.13.0

Prelude

- Solver _metadata is now cached on disk_, and validated using conditional requests, resulting in **faster `Client`/`Sampler` initialization**.
- Problem status is now observed using _long polling_, resulting in **shorter delays** between problem solved and solution downloaded.
- Problem data is now _compressed for upload_, resulting in **faster** problem **submit** on slower networks.
- Problem **preprocessing time** during submit is **cut in half**.
- Best case median QPU sample time now ranges from 260ms to 330ms.

New Features

- Enable QPU problem data compression on upload using `deflate` content encoding.

Compression is controlled with a new config option, `compress_qpu_problem_data`, defaulting to true, and it can be turned off either in config file or via `Client()` kwarg. See [\622](https://github.com/dwavesystems/dwave-cloud-client/issues/622).

- Add long polling as problem status/answer polling strategy.

We add the following config options: `poll_strategy` (`"backoff"` is the current default, `"long-polling"` is the new strategy), `poll_wait_time`, and `poll_pause`. See [\648](https://github.com/dwavesystems/dwave-cloud-client/issues/648).

- Add `timeout` keyword argument to `api.resources.Problems.get_problem_status()` and `api.resources.Problems.get_problem_statuses()` methods.

Use it to enable long polling on problem status API endpoint. The connection is closed (server-side) when at least one problem completes, or the `timeout` (in seconds) elapses, whatever comes first. See [\649](https://github.com/dwavesystems/dwave-cloud-client/pull/649).

- Add support for retrieving filtered solver configuration to `dwave.cloud.api.resources.Solvers` methods. See [\644](https://github.com/dwavesystems/dwave-cloud-client/pull/644).

- Add API response caching support to `dwave.cloud.api` interface. Cache is validated using a conditional request based on `ETag`. See [\645](https://github.com/dwavesystems/dwave-cloud-client/pull/645).

- Poll for problem-status update using long-polling strategy by default. See [\662](https://github.com/dwavesystems/dwave-cloud-client/pull/662).

Long-polling strategy enables faster status-change propagation to the client, especially for longer jobs, or during heavy QPU usage.

- Speed-up function calls that dispatch events by short-circuiting the dispatch in case no event handlers are registered. See [\660](https://github.com/dwavesystems/dwave-cloud-client/pull/660).

- Add `timeout` keyword argument to `api.resources.Problems.get_problem()` method.

Use it to enable long polling on problem fetch API endpoint. The connection is closed (server-side) when the problem completes, or the `timeout` (in seconds) elapses, whatever comes first. In case problem completed in time, problem answer is returned in addition to problem status (which is always returned). See [\657](https://github.com/dwavesystems/dwave-cloud-client/pull/657).

- Enable regions metadata API cache control in `dwave.cloud.regions.get_regions()` by switching to `api.Regions` built-in caching session. See [\647](https://github.com/dwavesystems/dwave-cloud-client/issues/647).

- Speed-up JSON encoding and decoding by switching to `orjson`. See [\423](https://github.com/dwavesystems/dwave-cloud-client/issues/423).

- Parse `Cache-Control` header field if present in API response, and use it to guide local caching policy.

This means `dwave.cloud.api.DWaveAPIClient` and `dwave.cloud.api.resource` classes now respect origin server response caching policy. See [\646](https://github.com/dwavesystems/dwave-cloud-client/issues/646).

- Cache solver metadata on disk, using conditional requests for cache validation (update).

Static and dynamic parts of solver metadata are fetched and stored separately, to enable efficient caching.

See [\613](https://github.com/dwavesystems/dwave-cloud-client/issues/613).

- Lazily import `Client`/`Solver`/`Future` in the top-level namespace, `dwave.cloud`. Direct imports are preferred, e.g. `from dwave.cloud.client import Client`, but the widely-used way (`from dwave.cloud import Client`) is still supported for backwards compatibility.

Similarly we now lazily import old namespaces with client type as submodule, e.g. `dwave.cloud.qpu`.

The main benefit of such lazy imports is import performance, as "heavy" symbols are only imported when explicitly needed/asked for. See [\643](https://github.com/dwavesystems/dwave-cloud-client/pull/643).

- Speed-up imports by slightly decoupling submodules. See [\643](https://github.com/dwavesystems/dwave-cloud-client/pull/643).

- Speed-up `dwave.cloud.utils.qubo.active_qubits` utility function by ~50%, and `dwave.cloud.coders.encode_problem_as_qp` by 20-30%. See [\661](https://github.com/dwavesystems/dwave-cloud-client/pull/661).

- Speed-up QPU problem sampling when problem submitted as BQM by 40%. For best performance, keep linear and quadratic biases in `dict`s. See [\661](https://github.com/dwavesystems/dwave-cloud-client/pull/661).

- Cache dynamic solver metadata for up to 15 minutes, unless defined differently by API cache control response header. See [\663](https://github.com/dwavesystems/dwave-cloud-client/pull/663).

Upgrade Notes

- Short polling with exponential backoff is not used by default anymore, but it is still available. If for some reason you want to use it, set:

poll_strategy = backoff

configuration parameter in your config file, or the keyword argument in calls to `Client()` or `Client.from_config()`. See [\662](https://github.com/dwavesystems/dwave-cloud-client/pull/662).

- Config attributes previously available directly on `Client` instance, deprecated in `dwave-cloud-client==0.11.0`, are removed in `dwave-cloud-client==0.13.0`.

Use config model (`dwave.cloud.config.models.ClientConfig`) available as `Client.config` to access client configuration instead.

Path to most attributes translates directly. For example, `Client.region` is now available as `Client.config.region`. One attribute has been renamed (`Client.default_solver` is now `Client.config.solver`), and all `Client.poll_*` config options are consolidated under `Client.config.polling_schedule.*`. Similarly `Client.http_retry_*` options are now available under `Client.config.request_retry.*`. See [\664](https://github.com/dwavesystems/dwave-cloud-client/pull/664).

Deprecation Notes

- `dwave.cloud.utils.coders.NumpyEncoder` is deprecated and will be removed in `dwave-cloud-client==0.14.0`. Use `orjson.dumps()` with `OPT_SERIALIZE_NUMPY` option instead. See [\652](https://github.com/dwavesystems/dwave-cloud-client/pull/652).

- Shorthand import paths for specialized Clients (for `qpu`, `sw` and `hybrid`) are deprecated in `dwave-cloud-client==0.12.2` and will be removed in `dwave-cloud-client==0.14.0`. Instead, use the full import path, e.g. `from dwave.cloud.client.qpu import Client`, instead of `from dwave.cloud.qpu import Client`. See [\643](https://github.com/dwavesystems/dwave-cloud-client/pull/643).

Bug Fixes

- Defer SQLite connect in `cached.ondisk()` until actually needed. Also, verify cache thread/process-safety and forking support. See [\642](https://github.com/dwavesystems/dwave-cloud-client/pull/642).

- Fix `get_cache_dir()` to not create the cache directory by default. Creation is now optional and controlled with `create` argument. This makes it consistent with other config path functions. See [\642](https://github.com/dwavesystems/dwave-cloud-client/pull/642).

- Fix possible race condition during cache directory create. See [homebase\37](https://github.com/dwavesystems/homebase/issues/37), [\#642](https://github.com/dwavesystems/dwave-cloud-client/pull/642).

- During solver metadata filtering, treat solver `status` as a dynamic field. This is to handle an edge case when solver is marked `offline`, but it's still available via API. See [\663](https://github.com/dwavesystems/dwave-cloud-client/pull/663).

0.12.20

New Features

- Use `dict` rather than `collections.OrderedDict` to capture the inputs in `TrackingComposite`. See also [\1395](https://github.com/dwavesystems/dimod/issues/1395).

- Add `dimod.Scoped` abstract base class for components that allocate scope-bound resources.

- Implement `dimod.Scoped` interface on `dimod.Sampler` and `dimod.Composite`. See [dwave-system\555](https://github.com/dwavesystems/dwave-system/issues/555).

- Add `quadratic_multi_knapsack` generator function to `dimod.generators`.

Bug Fixes

- Fix inheritance in ``ComposedSampler`` and ``ComposedPolySampler`` so that composite attributes override sampler attributes. See [1402](https://github.com/dwavesystems/dimod/issues/1402).

Page 16 of 33

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.