Skip to content

Error import fairseq #4

@YECHENGFANG

Description

@YECHENGFANG

Hi there

I’m trying to run the codes from this repository on COLAB but I get an error when importing fairseq in the first cells.


ImportError Traceback (most recent call last)
in <cell line: 6>()
4 get_ipython().system('pip install --editable ./')
5
----> 6 import fairseq

6 frames
/content/fairseq/fairseq/optim/lr_scheduler/inverse_square_root_schedule.py in
4 # LICENSE file in the root directory of this source tree.
5
----> 6 from collections import Collection
7 from dataclasses import dataclass, field
8 from typing import List

ImportError: cannot import name 'Collection' from 'collections' (/usr/lib/python3.10/collections/init.py)
ERROR IMPORT

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions