Add Optional to remaining types (#37808)
More Optional typing Signed-off-by: cyy <cyyever@outlook.com>
This commit is contained in:
@@ -17,6 +17,7 @@ import os
|
||||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
from unittest.mock import patch
|
||||
|
||||
from parameterized import parameterized
|
||||
@@ -270,13 +271,13 @@ class TestTrainerExt(TestCasePlus):
|
||||
learning_rate: float = 3e-3,
|
||||
optim: str = "adafactor",
|
||||
distributed: bool = False,
|
||||
extra_args_str: str = None,
|
||||
extra_args_str: Optional[str] = None,
|
||||
eval_steps: int = 0,
|
||||
predict_with_generate: bool = True,
|
||||
do_train: bool = True,
|
||||
do_eval: bool = True,
|
||||
do_predict: bool = True,
|
||||
n_gpus_to_use: int = None,
|
||||
n_gpus_to_use: Optional[int] = None,
|
||||
):
|
||||
data_dir = self.test_file_dir / "../fixtures/tests_samples/wmt_en_ro"
|
||||
output_dir = self.get_auto_remove_tmp_dir()
|
||||
|
||||
Reference in New Issue
Block a user