amazon-braket-sdk-python
amazon-braket-sdk-python copied to clipboard
Speed up `AwsDevice.get_devices()` call if possible
Describe the feature you'd like This call takes about ~18 seconds on our local machines with our accounts
How would this feature be used? Please describe. Performance improvements are always a win.
Describe alternatives you've considered
We implemented a version of get_devices
internally that hard-coded the execution windows but this is not too practical because we constantly have to monitor and update the windows when they do change.
Thanks for raising! It looks like a lot of the latency is coming from the initialization of AwsDevice objects, specifically around the get_device
service call for some of the annealing QPUs with large topology graphs. Filtering by status "ONLINE" should help somewhat, but there is still optimization that can be done to speed this up. Thank you for bringing it to our attention
Hi vtomole,
Just FYI, we recently changed the default functionality for this function to no longer return devices that have been marked as "RETIRED". While this is not as good as filtering by "ONLINE" status that ajberdy mentioned, it has improved the performance of the default call by about 50%, where it now runs (on my machine) in about 6s.
We hope you find this change beneficial.
Please let us know if you're still facing issues around this @vtomole!
This fixed it for me. Thanks!