New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multi region support #483
Add multi region support #483
Conversation
Codecov Report
@@ Coverage Diff @@
## master #483 +/- ##
==========================================
+ Coverage 85.51% 86.15% +0.64%
==========================================
Files 24 24
Lines 3099 3244 +145
==========================================
+ Hits 2650 2795 +145
Misses 449 449
Continue to review full report at Codecov.
|
d4ac771
to
0fb81c4
Compare
It appears that specifying a region when instantiating the Client from config does not override the endpoint specified in dwave.conf. For example, if dwave.conf specifies |
dwave/cloud/client/base.py
Outdated
|
||
return data | ||
|
||
def get_regions(self, refresh=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: make static after we refactor config (decouple from client construction).
In particular, we add: - Client.get_regions() - region config option and DWAVE_API_REGION env var - metadata_api_endpoint config option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DiskCache is approved from IP.
370980a
to
1f3e318
Compare
For example `region` in env should override `endpoint` in config file. However `endpoint` in file will override `region` in file.
@mdecandia, support for mutually exclusive config options (exclusive on different levels) should now be in. So, for example, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few things that popped out at me while I was going through these updates.
releasenotes/notes/add-multi-region-support-8c49dbd7bbcfc34b.yaml
Outdated
Show resolved
Hide resolved
Exposed on `DWaveAPIClient.session.history` as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and works well!
6087dfd
to
893b46e
Compare
893b46e
to
4e868f7
Compare
# Default SAPI endpoint | ||
DEFAULT_API_ENDPOINT = 'https://cloud.dwavesys.com/sapi/' | ||
# Default API endpoints | ||
DEFAULT_SOLVER_API_ENDPOINT = 'https://cloud.dwavesys.com/sapi/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be updated to https://na-west-1.cloud.dwavesys.com/sapi/v2
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both work. We can update the default once MR is GA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will be deprecating the old one at some point - charles is arranging a meeting to discuss timing
region
prompt in the "advanced"dwave config create
flow. This is not blocking the review, or even merge.