Skip to content

cannot import name 'Conversation' from 'transformers' #32096

Description

@amathews-amd

System Info

transformers tip of tree

Who can help?

@amyeroberts

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

pytest tests/ -m "not not_device_test" -p no:cacheprovider

______ ERROR collecting tests/pipelines/test_pipelines_conversational.py _______
ImportError while importing test module '/workspace/transformers/tests/pipelines/test_pipelines_conversational.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/conda/envs/py_3.9/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/pipelines/test_pipelines_conversational.py:18: in <module>
    from transformers import (
E   ImportError: cannot import name 'Conversation' from 'transformers' (/workspace/transformers/src/transformers/__init__.py)

Expected behavior

pytest collection succeeds with no error

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions