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

Clarify workflow for getting the metriq job id #114

Open
willzeng opened this issue Jan 1, 2025 · 1 comment
Open

Clarify workflow for getting the metriq job id #114

willzeng opened this issue Jan 1, 2025 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested

Comments

@willzeng
Copy link
Contributor

willzeng commented Jan 1, 2025

Right now the README instructions say:

If running on quantum cloud hardware, the job will be added to a polling queue. The status of the queue can be checked with

python metriq_gym/run.py poll --job_id <METRIQ_GYM_JOB_ID>

where <METRIQ_GYM_JOB_ID> is the assigned job ID of the job that was dispatched as provided by metriq-gym.

It is not clear to the user where / how to obtain the job ID. One can find it in the .metriq_gym_jobs.jonsl file. Some approaches for solution:

  1. Tell users to open the .metriq_gym_jobs.jonsl file to find their job id. Cons: (i) over time this file will get quite long and likely not that human readable (ii) you need to switch from working in terminal / notebook to opening up a source file and locating the last job, adding extra steps.
  2. Once the new 'list-jobs` command in the PR for feature: add list-jobs cli action. #96 is merged we could tell the user to run that command to get the job id. The downside is that this adds a separate step every time for getting a job id.
  3. We could improve the output of run.py to (i) print the job id as a string that can easily by copied and pasted and (ii) surpress the current logging of things like the IBM queue different transpiler passes to make that printed job id more obvious. The logging could be put behind a --verbose flag. If there are multiple jobs then the list-jobs command can help users keep track on the CLI.

I lean towards doing both 2 and 3 of these options.

Thoughts? Other ideas for how to improve this workflow? @vprusso @cosenal @WrathfulSpatula

@willzeng willzeng added documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested labels Jan 1, 2025
@cosenal
Copy link
Contributor

cosenal commented Jan 1, 2025

We can run list-jobs (the underlying action, not the cli command) by default whenever the user doesn't pass any job_id to the poll command, and let the user pick the job from the ones listed in the same interaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants