Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parser_op #330

Merged
merged 2 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading