Skip to content
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

Inconsistent behavior of Session initializers #1582

Closed
tachikoma-li opened this issue Apr 3, 2024 · 4 comments
Closed

Inconsistent behavior of Session initializers #1582

tachikoma-li opened this issue Apr 3, 2024 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@tachikoma-li
Copy link

Describe the bug

When creating a Session from id using Session.from_id, a deprecation warning is raised if one passes a backend argument. However, if one doesn't pass a backend, the default Session initializer (which is called from Session.from_id) would raise another deprecation warning or error.

It's not clear what's the expected behavior from the docs. Might be good to make the two initializers consistent.

If the default Session initializer now does require backend, it might be also good to update the type hints and the docs of the backend parameter.

*Steps to reproduce

Expected behavior

Suggested solutions

Additional Information

  • qiskit-ibm-runtime version: 0.22.0
  • Python version: 3.11
  • Operating system: macOS Sonoma
@tachikoma-li tachikoma-li added the bug Something isn't working label Apr 3, 2024
@kt474
Copy link
Member

kt474 commented Apr 3, 2024

Hi @tachikoma-li - there is an open PR for updating the from_id method (#1311). It will take care of the inconsistencies you have mentioned here.

@tachikoma-li
Copy link
Author

@kt474, nice to see it's tracked. Hopefully this could be addressed in the next release.

Closed as there is already a PR on it.

@kt474
Copy link
Member

kt474 commented Apr 5, 2024

@kt474, nice to see it's tracked. Hopefully this could be addressed in the next release.

Closed as there is already a PR on it.

We will try to have it in before the next release

@kt474
Copy link
Member

kt474 commented Apr 9, 2024

#1311 Has been merged, it'll be in the next release, planned for this Monday

@kt474 kt474 added this to the 0.23.0 milestone Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants