Skip to content

Commit

Permalink
Fix get_input_files (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwxxzz authored Jan 3, 2025
1 parent d10d8d2 commit af25195
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pai_rag/tools/data_process/dataset/file_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class FileDataset(ABC):
def __init__(self, dataset_path: str = None, cfg=None) -> None:
logger.info(f"Loading file dataset from {dataset_path}.")
self.data = get_input_files(dataset_path)
self.data, _ = get_input_files(dataset_path)
if cfg:
self.export_path = cfg.export_path

Expand Down
6 changes: 3 additions & 3 deletions src/pai_rag/tools/data_process/utils/download_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def download_models_via_lock(model_dir, model_name, accelerator="cpu"):

# 检查模型文件是否已经下载
if os.path.exists(model_path):
logger.info(f"进程 {os.getpid()} 检查到: 模型已下载完成")
logger.info(f"进程 {os.getpid()} 检查到: 模型已下载完成,环境: {accelerator}")
else:
logger.info(f"进程 {os.getpid()} 开始下载模型")
logger.info(f"进程 {os.getpid()} 开始下载模型,环境: {accelerator}")
ModelScopeDownloader(
fetch_config=True,
download_directory_path=model_dir,
Expand All @@ -30,7 +30,7 @@ def download_models_via_lock(model_dir, model_name, accelerator="cpu"):
fetch_config=True,
download_directory_path=model_dir,
).load_mineru_config(accelerator)
logger.info(f"进程 {os.getpid()} 下载模型完成")
logger.info(f"进程 {os.getpid()} 下载模型完成,环境: {accelerator}")

# 释放锁并结束循环
fcntl.flock(lock_file, fcntl.LOCK_UN)
Expand Down

0 comments on commit af25195

Please sign in to comment.