Add Optional to remaining types (#37808)
More Optional typing Signed-off-by: cyy <cyyever@outlook.com>
This commit is contained in:
@@ -19,6 +19,7 @@ import time
|
||||
from json import JSONDecodeError
|
||||
from logging import getLogger
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
import torch
|
||||
from torch.utils.data import DataLoader
|
||||
@@ -54,7 +55,7 @@ def eval_data_dir(
|
||||
task="summarization",
|
||||
local_rank=None,
|
||||
num_return_sequences=1,
|
||||
dataset_kwargs: dict = None,
|
||||
dataset_kwargs: Optional[dict] = None,
|
||||
prefix="",
|
||||
**generate_kwargs,
|
||||
) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user