[data-loader] Allow dataset_dir to accept a dict for in-memory dataset_info (#8845)

This commit is contained in:
kahlun
2025-08-07 16:26:59 +08:00
committed by GitHub
parent b523543994
commit 8a5d6c8a74
2 changed files with 7 additions and 5 deletions

View File

@@ -16,7 +16,7 @@
# limitations under the License.
from dataclasses import asdict, dataclass, field
from typing import Any, Literal, Optional
from typing import Any, Literal, Optional, Union
@dataclass
@@ -35,7 +35,7 @@ class DataArguments:
default=None,
metadata={"help": "The name of dataset(s) to use for evaluation. Use commas to separate multiple datasets."},
)
dataset_dir: str = field(
dataset_dir: Union[str, dict] = field(
default="data",
metadata={"help": "Path to the folder containing the datasets."},
)