-
Notifications
You must be signed in to change notification settings - Fork 183
Update usage method to include remaining usage #2329
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
Conversation
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.
The method needs to handle the None
case independently. I tried the new method with an open plan account and it raised a TypeError:
>>> service.usage()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/ept/qiskit_workspace/qiskit-ibm-runtime/qiskit_ibm_runtime/qiskit_runtime_service.py", line 1037, in usage
usage_dict.get("usage_limit_seconds", usage_dict.get("usage_allocation_seconds"))
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
In the case where |
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.
LGTM, I just have a final remark, should we call the entry usage_remaining_seconds
for consistency with the others? I find it a bit strange to suddenly drop the units.
Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>
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.
Thanks for the improvements, I really like the new release note. LGTM.
Summary
Also cleaned up the old usage() methods from IQP classic
Details and comments
Fixes #1829