Support unilabos_samples key

(cherry picked from commit 554bcade24)
This commit is contained in:
Xuwznln
2025-11-19 15:53:59 +08:00
parent 956b1c905b
commit 4875977d5f
2 changed files with 10 additions and 2 deletions

View File

@@ -2,7 +2,8 @@ import argparse
import os
import time
from datetime import datetime
from typing import Dict, Optional, Tuple
from pathlib import Path
from typing import Dict, Optional, Tuple, Union
import requests
@@ -97,7 +98,7 @@ def _put_upload(file_path: str, upload_url: str) -> bool:
def oss_upload(
file_path: str,
file_path: Union[str, Path],
filename: Optional[str] = None,
driver_name: str = "default",
exp_type: str = "default",
@@ -122,6 +123,7 @@ def oss_upload(
"oss_path": str # OSS路径成功时或空字符串失败时
}
"""
file_path = Path(file_path)
if filename is None:
filename = os.path.basename(file_path)