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

Uninterruptible Execution Upon Error in Google Colab #2500

Open
3 of 4 tasks
j3soon opened this issue Jan 9, 2025 · 0 comments
Open
3 of 4 tasks

Uninterruptible Execution Upon Error in Google Colab #2500

j3soon opened this issue Jan 9, 2025 · 0 comments

Comments

@j3soon
Copy link

j3soon commented Jan 9, 2025

Required prerequisites

  • Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
  • Make sure you've read the documentation. Your issue may be addressed there.
  • Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
  • If possible, make a PR with a failing test to give us a starting point to work on!

Describe the bug

If any error occurs when using CUDA-Q in Google Colab, the execution often becomes uninterruptible, and would require restarting the entire Colab session. This makes REPL trial-and-error editing difficult on Colab.

This issue doesn't seem to occur when running a python script on a local machine, or using a self-hosted jupyter lab.

Potentially related: #244, #1764

Thanks @Squirtle007 and @y-h-Lin for helping confirm this issue.

Steps to reproduce the bug

  • Open a New Notebook on Colab
  • Create and Execute Cell 1:
    !pip install cudaq
    
  • Create and Execute Cell 2:
    import cudaq
    print(A)
    
  • Observe the uninterruptible execution.
    Image
    Image

Full Error Message:

ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.

ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.

ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.

NameError: name 'A' is not defined

During handling of the above exception, another exception occurred:

AttributeError: 'NameError' object has no attribute '_render_traceback_'

During handling of the above exception, another exception occurred:

AssertionError
NameError: name 'A' is not defined

During handling of the above exception, another exception occurred:

AttributeError: 'NameError' object has no attribute '_render_traceback_'

During handling of the above exception, another exception occurred:

TypeError: object of type 'NoneType' has no len()

During handling of the above exception, another exception occurred:

AttributeError: 'TypeError' object has no attribute '_render_traceback_'

During handling of the above exception, another exception occurred:

AssertionError
NameError: name 'A' is not defined

During handling of the above exception, another exception occurred:

AttributeError: 'NameError' object has no attribute '_render_traceback_'

During handling of the above exception, another exception occurred:

TypeError: object of type 'NoneType' has no len()

During handling of the above exception, another exception occurred:

AttributeError: 'TypeError' object has no attribute '_render_traceback_'

During handling of the above exception, another exception occurred:

TypeError: object of type 'NoneType' has no len()

During handling of the above exception, another exception occurred:

AttributeError: 'TypeError' object has no attribute '_render_traceback_'

During handling of the above exception, another exception occurred:

AssertionError

Expected behavior

When an error occurred, the execution should be interruptible by clicking the Stop button, and should not require a session restart.

Is this a regression? If it is, put the last known working version (or commit) here.

Not a regression

Environment

  • CUDA-Q version: 0.9.1
    (!pip install cudaq on Google Colab)
  • Python version: Python 3.10.12
    (!python --version on Google Colab)
  • C++ compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
    (!gcc --version on Google Colab)
  • Operating system: Ubuntu 22.04.3 LTS
    (!lsb_release -a on Google Colab)

Suggestions

No response

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

No branches or pull requests

1 participant