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

Empty logs after a failed import statement #1105

Open
caleb-johnson opened this issue Nov 17, 2023 · 5 comments
Open

Empty logs after a failed import statement #1105

caleb-johnson opened this issue Nov 17, 2023 · 5 comments
Labels
bug Something isn't working
Milestone

Comments

@caleb-johnson
Copy link
Collaborator

Job id 'd5234ef5-2873-44b9-a205-4fad9aab1fdc' had an import statement that wasn't available in the deployed Qiskit version (qiskit.circuit.lilbrary.UnitaryOverlap)

The problem is that for this particular job, job.logs() returned empty, instead of returning the import error. The same thing happened for several runs before this.

Job ID '0b3eeb8f-55c0-42ff-87c3-b3c285683380' properly displayed the error in the logs, but one thing I did different in this job was that I embedded print statements throughout the script. I'm not sure if that played a part, or if it randomly worked as expected in this job.

@caleb-johnson caleb-johnson added the bug Something isn't working label Nov 17, 2023
@caleb-johnson
Copy link
Collaborator Author

`'fd64febc-0c45-48cf-837b-6c121deea404'

result and logs were empty for this script when the same script successfully ran on previous iteration

@IceKhan13 IceKhan13 added this to the Q1'24 milestone Dec 12, 2023
@psschwei
Copy link
Collaborator

psschwei commented Feb 1, 2024

@caleb-johnson can you share a version of this script so we can try to reproduce?

@caleb-johnson
Copy link
Collaborator Author

caleb-johnson commented Feb 1, 2024

@caleb-johnson can you share a version of this script so we can try to reproduce?

I don't believe the contents of the script, or any specific issue with the source code, was causing this. It seemed like intermittently the job logs would be empty, regardless of what was contained in the code or the expected stdout. These particular jobs were ones that I noticed at a time when I decided to actually write up an issue for this problem. I saw this behavior for much of the 2nd half of last year at various times.

I had a hypothesis that maybe I was spamming the jupyter notebook cells too fast and ~4 API calls were being submitted simultaneously (submit, result, job_id, logs) and it was causing the logs API call to behave strangely. I'm not sure if that is a possibility, but a few times it errored in this way I did notice I had run multiple cells/API calls within less than a second

@caleb-johnson
Copy link
Collaborator Author

caleb-johnson commented Feb 1, 2024

from quantum_serverless import QuantumServerless, Provider, Program


provider = Provider(token="<token>", host="<test_server url>")
serverless = QuantumServerless(provider)

program = Program(title="program", entrypoint="program.py", working_dir="./src/")

job = serverless.run(program)

job.job_id

job.status()

job.logs()

This is the notebook script which intermittently/incorrectly returned empty logs. The contents of the source code didn't seem to play a role. Each spaced block of code represents a new cell in the notebook (in case this is some kind of jupyter bug).

I would wait until status reported that it had completed successfully, but the logs would be empty even after successful completion of the job.

@psschwei
Copy link
Collaborator

psschwei commented Feb 2, 2024

Thanks @caleb-johnson , will try to break stuff shortly 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants