mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-12-30 02:30:35 +08:00
[deps] goodbye python 3.9 (#9677)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: hiyouga <16256802+hiyouga@users.noreply.github.com> Co-authored-by: hiyouga <hiyouga@buaa.edu.cn>
This commit is contained in:
@@ -27,7 +27,7 @@ Get Data Sample:
|
||||
|
||||
import os
|
||||
from collections.abc import Iterable
|
||||
from typing import Any, Union
|
||||
from typing import Any
|
||||
|
||||
from huggingface_hub import hf_hub_download
|
||||
from omegaconf import OmegaConf
|
||||
@@ -134,7 +134,7 @@ class DataEngine(Dataset):
|
||||
else:
|
||||
return len(self.data_index)
|
||||
|
||||
def __getitem__(self, index: Union[int, Any]) -> Union[Sample, list[Sample]]:
|
||||
def __getitem__(self, index: int | Any) -> Sample | list[Sample]:
|
||||
"""Get dataset item.
|
||||
|
||||
Args:
|
||||
|
||||
Reference in New Issue
Block a user