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

method to check if a batch task is complete #756

Open
jon-wurtz opened this issue Oct 25, 2023 · 2 comments
Open

method to check if a batch task is complete #756

jon-wurtz opened this issue Oct 25, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@jon-wurtz
Copy link

Is your feature request related to a problem? Please describe.
Given a (running or complete?) batch task, it is unclear if all of the jobs have returned all bitstrings and no further query to remote is needed

Describe the solution you'd like
job.status() for batchtask, with the same functionality as for single tasks

Describe alternatives you've considered
return np.logical_and([task.status() for task in job.tasks])

@jon-wurtz jon-wurtz added the enhancement New feature or request label Oct 25, 2023
@jon-wurtz
Copy link
Author

Additionally, if the task report already has all bitstring measurements accounted for, there would be no need to query remote

@weinbe58
Copy link
Member

weinbe58 commented Oct 25, 2023

In general the status of the tasks is not simply just Queued and Completed there are actually around 8 possible states a task can be in so its hard to map communicate the general status of the batch in a single status. One thing you can do is filter a batch by status codes, e.g. if I want just completed tasks I can filter based on Completed status:

completed_tasks = batch.get_tasks("Completed")
missing_tasks = batch.remove_tasks("Completed")

also batch.tasks_metric() returns a pandas Dataframe that contains the current knowledge of the tasks in the batch so you can get more fine grain information about the batch from that object.

Additionally, if the task report already has all bitstring measurements accounted for, there would be no need to query remote

Thanks, we've already thought of that so we're all set!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants