AttributeError                            Traceback (most recent call last)
File /opt/conda/lib/python3.10/site-packages/transformers/utils/import_utils.py:1603, in _LazyModule._get_module(self, module_name)
   1602 try:
-> 1603     return importlib.import_module("." + module_name, self.__name__)
   1604 except Exception as e:

File /opt/conda/lib/python3.10/importlib/__init__.py:126, in import_module(name, package)
    125         level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)

File <frozen importlib._bootstrap>:1050, in _gcd_import(name, package, level)

File <frozen importlib._bootstrap>:1027, in _find_and_load(name, import_)

File <frozen importlib._bootstrap>:1006, in _find_and_load_unlocked(name, import_)

File <frozen importlib._bootstrap>:688, in _load_unlocked(spec)

File <frozen importlib._bootstrap_external>:883, in exec_module(self, module)

File <frozen importlib._bootstrap>:241, in _call_with_frames_removed(f, *args, **kwds)

File /opt/conda/lib/python3.10/site-packages/transformers/pipelines/__init__.py:26
     25 from ..feature_extraction_utils import PreTrainedFeatureExtractor
---> 26 from ..image_processing_utils import BaseImageProcessor
     27 from ..models.auto.configuration_auto import AutoConfig

File /opt/conda/lib/python3.10/site-packages/transformers/image_processing_utils.py:21
     20 from .image_processing_base import BatchFeature, ImageProcessingMixin
---> 21 from .image_transforms import center_crop, normalize, rescale
     22 from .image_utils import ChannelDimension

File /opt/conda/lib/python3.10/site-packages/transformers/image_transforms.py:22
     20 import numpy as np
---> 22 from .image_utils import (
     23     ChannelDimension,
     24     ImageInput,
     25     get_channel_dimension_axis,
     26     get_image_size,
     27     infer_channel_dimension_format,
     28 )
     29 from .utils import ExplicitEnum, TensorType, is_jax_tensor, is_tf_tensor, is_torch_tensor

File /opt/conda/lib/python3.10/site-packages/transformers/image_utils.py:58
     57 if is_torchvision_available():
---> 58     from torchvision.transforms import InterpolationMode
     60     pil_torch_interpolation_mapping = {
     61         PILImageResampling.NEAREST: InterpolationMode.NEAREST,
     62         PILImageResampling.BOX: InterpolationMode.BOX,
   (...)
     66         PILImageResampling.LANCZOS: InterpolationMode.LANCZOS,
     67     }

File /opt/conda/lib/python3.10/site-packages/torchvision/__init__.py:10
      9 from .extension import _HAS_OPS  # usort:skip
---> 10 from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils  # usort:skip
     12 try:

File /opt/conda/lib/python3.10/site-packages/torchvision/_meta_registrations.py:26
     22     return wrapper
     25 @register_meta("roi_align")
---> 26 def meta_roi_align(input, rois, spatial_scale, pooled_height, pooled_width, sampling_ratio, aligned):
     27     torch._check(rois.size(1) == 5, lambda: "rois must have shape as Tensor[K, 5]")

File /opt/conda/lib/python3.10/site-packages/torchvision/_meta_registrations.py:18, in register_meta.<locals>.wrapper(fn)
     17 def wrapper(fn):
---> 18     if torchvision.extension._has_ops():
     19         get_meta_lib().impl(getattr(getattr(torch.ops.torchvision, op_name), overload_name), fn)

AttributeError: partially initialized module 'torchvision' has no attribute 'extension' (most likely due to a circular import)

The above exception was the direct cause of the following exception:

RuntimeError                              Traceback (most recent call last)
Cell In[11], line 34
     31 model.eval()
     33 # Our text generator
---> 34 generator = transformers.pipeline(
     35     model=model, tokenizer=tokenizer,
     36     task='text-generation',
     37     temperature=0.1,
     38     max_new_tokens=500,
     39     repetition_penalty=1.1
     40 )
     42 # System prompt describes information given to all conversations
     43 system_prompt = """
     44 

 

     45 You are a helpful, respectful and honest assistant for labeling topics.
     46 

     47 """

File /opt/conda/lib/python3.10/site-packages/transformers/utils/import_utils.py:1593, in _LazyModule.__getattr__(self, name)
   1591     value = self._get_module(name)
   1592 elif name in self._class_to_module.keys():
-> 1593     module = self._get_module(self._class_to_module[name])
   1594     value = getattr(module, name)
   1595 else:

File /opt/conda/lib/python3.10/site-packages/transformers/utils/import_utils.py:1605, in _LazyModule._get_module(self, module_name)
   1603     return importlib.import_module("." + module_name, self.__name__)
   1604 except Exception as e:
-> 1605     raise RuntimeError(
   1606         f"Failed to import {self.__name__}.{module_name} because of the following error (look up to see its"
   1607         f" traceback):\n{e}"
   1608     ) from e

RuntimeError: Failed to import transformers.pipelines because of the following error (look up to see its traceback):
partially initialized module 'torchvision' has no attribute 'extension' (most likely due to a circular import)
 che singifica questo errore?