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

Expose session details #887

Closed
2 tasks
nonhermitian opened this issue Jun 2, 2023 · 3 comments · Fixed by #1119
Closed
2 tasks

Expose session details #887

nonhermitian opened this issue Jun 2, 2023 · 3 comments · Fixed by #1119
Assignees
Labels
enhancement New feature or request server action Need actions from the server side
Milestone

Comments

@nonhermitian
Copy link
Contributor

nonhermitian commented Jun 2, 2023

What is the expected feature or enhancement?

An user should be able to query for the remaining session time from a session instance. In addition, it'd also be useful to know about session status, and what the various TTLs are.

Acceptance criteria

  • Expose session details, including
    • backend name
    • created/updated/started/closed timestamps
    • last job start/complete
    • interactive ttl (map to interactive_timeout)
    • max ttl (map to max_time to match session parameter)
    • state (should map to open, closed (not accepting job, see this issue), and cancelled)
  • Doc update
@nonhermitian nonhermitian added the enhancement New feature or request label Jun 2, 2023
@jyu00 jyu00 added the server action Need actions from the server side label Jun 12, 2023
@jyu00 jyu00 changed the title An user should be able to programmatically get the reamaining time of an active session Expose session details Aug 23, 2023
@kt474 kt474 added this to the 0.12.2 milestone Sep 19, 2023
@kt474
Copy link
Member

kt474 commented Sep 19, 2023

@merav-aharoni you can see how these session details are exposed here. Currently, this is only supported on the cloud channel. We can start working on this issue, but should wait until this is also supported on the iqp side before merging.

You can also see @kvcmarshall's helpful screen shots in her PR on the server side (ntc 3052)

Waiting on sw-api-iqp PR's 418 and 411

There are more details in ws-qiskit-runtime-api issue 247

Something to keep in mind with this, and I'm not sure how Qiskit works with this, but the GET /sessions/:id API is only being implemented in the ntc and sw-api-iqp (new job service) repos, not the ntc-iqp-channel fork. The ntc repo is deployed for cloud pay-go and IQP DE (Fraunhofer). The sw-api-iqp service is only going to be deployed in the US.

So Qiskit may need to account for those wrinkles when forming a request depending on the base URL. Like, if I'm using qiskit-ibm-runtime and the channel is quantum then in the US it'll be talking to sw-api-iqp but in DE it'd be talking to ntc, will Qiskit know how to form the URLs properly?

If this is the case, we can try using try/except and return None if it's not supported.

@kt474 kt474 self-assigned this Sep 27, 2023
@jyu00
Copy link
Collaborator

jyu00 commented Sep 27, 2023

@beckykd we should also update session docs once this is done - e.g. under session time limits we can show code to query the data.

@mriedem
Copy link
Contributor

mriedem commented Sep 28, 2023

For IQP (quantum channel) the API is here: https://api.quantum-computing.ibm.com/runtime/api#/sessions/GetSessionDetailsController_sendAcceptingJobs

@kt474 kt474 modified the milestones: 0.12.2, 0.13.0 Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server action Need actions from the server side
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants