Skip to content

Colab Environment Completely Unusable #879

@Crurp

Description

@Crurp

The result of an upgrade to tensorflow 2.18 or augmentation to the Google Colab environment, has caused all my QML models to be unusable. Specific issue is with the inability to import the tensorflow-quantum library.


RecursionError Traceback (most recent call last)
in <cell line: 0>()
----> 1 import tensorflow as tf
2 import tensorflow_quantum as tfq
3 import cirq
4 import numpy as np
5 import sympy

16 frames
... last 4 frames repeated, from the frame below ...

/usr/local/lib/python3.11/dist-packages/numpy/core/_dtype.py in repr(dtype)
44
45 def repr(dtype):
---> 46 arg_str = _construction_repr(dtype, include_align=False)
47 if dtype.isalignedstruct:
48 arg_str = arg_str + ", align=True"

RecursionError: maximum recursion depth exceeded while getting the repr of an object
I’ve had to rewrite all my code to implement QML models using only Cirq and TensorFlow, a process that has been technically challenging and unpleasant. Even then, it is using a workaround.

Hope a fix is coming soon via a patch. I'll periodically check the basic tutorial page, suffering the same issue, to verify tensorflow-quantum functionality, but until then I've cancelled my colab pro plan. ;'(

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions