Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Query programs by name #194

Closed
wants to merge 58 commits into from
Closed

Query programs by name #194

wants to merge 58 commits into from

Conversation

kt474
Copy link
Member

@kt474 kt474 commented Nov 2, 2021

Summary

fixes #180

Details and comments

There will be merge conflicts and many edits necessary with #170 - should hold off until it is merged first

rathishcholarajan and others added 30 commits October 18, 2021 01:14
* Remove version field from runtime program

* Add release note
This needs to change in the program upload body request in order to
meet the IBM Cloud API guidance.

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
* Remove version field from runtime program

* Add release note
This needs to change in the program upload body request in order to
meet the IBM Cloud API guidance.

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
* Accept JSON schema as program metadata

* Update qiskit_ibm/runtime/ibm_runtime_service.py

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
* update runtime metadata

* return if no data

* fix mypy

* Update releasenotes/notes/update-runtime-metadata-d2ddbcfc0d034530.yaml

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
* Remove version field from runtime program

* Add release note
This needs to change in the program upload body request in order to
meet the IBM Cloud API guidance.

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
* Accept JSON schema as program metadata

* Update qiskit_ibm/runtime/ibm_runtime_service.py

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
test/ibm/runtime/test_runtime.py Outdated Show resolved Hide resolved
test/ibm/runtime/test_runtime.py Outdated Show resolved Hide resolved
test/ibm/runtime/test_runtime_integration.py Outdated Show resolved Hide resolved
test/ibm/runtime/test_runtime_integration.py Outdated Show resolved Hide resolved
test/ibm/runtime/test_runtime_integration.py Outdated Show resolved Hide resolved
test/ibm/runtime/test_runtime.py Outdated Show resolved Hide resolved
kt474 and others added 6 commits November 5, 2021 12:27
Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
kt474 and others added 2 commits November 7, 2021 19:57
* add provider param

* split provider into hub/group/project

* add reno

* wip add test case

* fix lint/docs

* Update qiskit_ibm/runtime/ibm_runtime_service.py

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* Update releasenotes/notes/filter-jobs-by-provider-dead04faaf223840.yaml

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* refactor test cases

* remove print

* add integration test

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
rathishcholarajan and others added 2 commits November 7, 2021 21:36
* wip add limit/offset params

* add reno

* refactor & update test case

* offset -> skip, implement refresh logic

* refresh when skip/limit not default

* Update releasenotes/notes/runtime-program-pagination-8d599ae984a5ce33.yaml

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* Update releasenotes/notes/runtime-program-pagination-8d599ae984a5ce33.yaml

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* add  to test case

* refactor refresh logic

* refactor

* fix lint

* add integration test

* update doc string

* Update qiskit_ibm/api/clients/runtime.py

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* cleanup merge

* Apply suggestions from code review

* fix lint refactor

* Fetch all programs upfront 20 at a time and store in cache

For subsequent requests paginate and return from cache

* Fix integration test

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
Co-authored-by: Rathish Cholarajan <Rathish.C@ibm.com>
@rathishcholarajan
Copy link
Member

@kt474 If name is passed and we have programs in cache, then we need to loop through programs in cache and return program for given name. If refresh = True is passed then we need to fetch the latest program for given name from API, update cache and then return program.

@rathishcholarajan rathishcholarajan changed the base branch from runtime-release-q4 to main November 9, 2021 22:20
Copy link
Member

@rathishcholarajan rathishcholarajan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kt474 I had to merge the runtime-release-q4 branch to main. I changed the base of this PR to main. Could you pls rebase with main and resolve conflicts?

@rathishcholarajan
Copy link
Member

Moved to Qiskit/qiskit-ibm-runtime#14

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport potential The bug might be minimal and/or important enough to be port to stable Changelog: New Feature Include in the Added section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Query programs by program name
4 participants