INNER CODE UNIT · Python
GeneralArguments
hooshvare/parsbert · scripts/run_clf_finetuning.py:50
class GeneralArguments:
"""Arguments for setting up general configuarion"""
output_mode: str = field(
metadata={"help": "indicating the output mode. Either ``regression`` or ``classification``"}
)
convert_to_tf: bool = field(
default=True, metadata={"help": "Convert the final PyTorch model to TensorFlow!"}
)
labels: Optional[str] = field(
default='', metadata={"help": "Enter the label name of your labels separate by comma: apple,orange,banana"}
)
def _labels(self):
if self.output_mode == 'classification':
return [str(l) for l in list(set(self.labels.split(',')))]
return []