bloqade-python icon indicating copy to clipboard operation
bloqade-python copied to clipboard

job.pull() is unstoppable

Open jon-wurtz opened this issue 2 years ago • 7 comments

If I call job.pull() on a hardware job on the command line, I can't stop the line from blocking, eg CTRL-C doesn't stop it.

jon-wurtz avatar Aug 30 '23 19:08 jon-wurtz

Can you give some more context for this? what is the "command line" you're using etc.

weinbe58 avatar Aug 30 '23 19:08 weinbe58

I am using an iPython command line after initializing a job using https://github.com/QuEraComputing/hybrid_algorithms/blob/main/examples/implementation_mis.py . I use job.pull() to block progress until the job is complete, but it seems to never return values

jon-wurtz avatar Aug 30 '23 20:08 jon-wurtz

I understand that this is probably pretty hard to reproduce but perhaps instead of leaning on AWS triggers, instead query every X seconds if the job status is Complete?

jon-wurtz avatar Aug 30 '23 20:08 jon-wurtz

I believe you need to keep checking the interrupt exception during the whatever loop that hangs the current process.

Roger-luo avatar Aug 31 '23 18:08 Roger-luo

There is no interrupt exception, it just hangs even when I call an interrupt.

jon-wurtz avatar Sep 05 '23 13:09 jon-wurtz

by "you" I actually meant braket, there is a loop waiting for the result but not catching your interrupt which is what I believe is why it hangs.

Roger-luo avatar Sep 07 '23 01:09 Roger-luo

image

job.fetch() still sometimes holds indefinitely even if the jobs have been completed (checked via the AWS dashboard). This is a bad user experience issue.

The job in this example is a pretty generic batch job (with a single job inside of it) with 50 shots and ~180 atoms, implementing an adiabatic state prep for MIS

jon-wurtz avatar Sep 13 '23 20:09 jon-wurtz