Skip to content

Error when running retriever/simcse/run_train.py script #22

@SugarMoonn

Description

@SugarMoonn

hi!I am currently working with your project and trying to run the retriever/simcse/run_train.py script, but I am encountering the following error:Traceback (most recent call last):
File "retriever/simcse/run_train.py", line 225, in
main()
File "retriever/simcse/run_train.py", line 38, in main
parser = HfArgumentParser((ModelArguments, DataTrainingArguments, OurTrainingArguments, RetrieverArguments))
File "/root/miniconda3/envs/docprompting/lib/python3.8/site-packages/transformers/hf_argparser.py", line 52, in init
self._add_dataclass_arguments(dtype)
File "/root/miniconda3/envs/docprompting/lib/python3.8/site-packages/transformers/hf_argparser.py", line 93, in _add_dataclass_arguments
elif hasattr(field.type, "origin") and issubclass(field.type.origin, List):
File "/root/miniconda3/envs/docprompting/lib/python3.8/typing.py", line 774, in subclasscheck
return issubclass(cls, self.origin)
TypeError: issubclass() arg 1 must be a class
It seems this error occurs when initializing the HfArgumentParser, specifically while handling dataclass fields with type annotations. I'm unsure if the problem is related to my environment or a compatibility issue.

Could you kindly provide guidance on how to resolve this?

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