@dataclass class ScriptArguments: blabla = field() parser = HfArgumentParser(ScriptArguments) script_args = parser.parse_args_into_dataclasses()[0]
from argparse import ArgumentParser from enum import Enum from pathlib import Path from typing import Any, Iterable, List, NewType, Optional, Tuple, Union DataClass = NewType("DataClass", Any) DataClassType = NewType("DataClassType", Any) class HfArgumentParser(ArgumentParser):
transformers.hf_argparser — transformers 4.2.0 documentation
ⓘ You are viewing legacy docs. Go to latest documentation instead.
https://huggingface.co/transformers/v4.2.2/_modules/transformers/hf_argparser.html

Seonglae Cho