This repository has been archived on 2025-11-14. You can view files and clone it, but cannot push or open issues or pull requests.
qwen-vl-finetune-bonus/checkPath.py

18 lines
597 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import os
from peft import PeftModel, PeftConfig
# --- 开始调试 ---
# 1. 明确你的 checkpoint 路径
check_point_path = "/home/gyk/Qwen2.5-VL/output/Qwen2.5-VL-7B/checkpoint-126/"
# 2. 打印路径信息进行验证
print("-" * 50)
print(f"正在检查路径: {check_point_path}")
print(f"路径是否存在? {os.path.exists(check_point_path)}")
print(f"是否为文件夹? {os.path.isdir(check_point_path)}")
print("-" * 50)
# 期望的输出是 True, True。如果任何一个是 False说明你的路径字符串有误或 checkpoint 没有被正确保存。
# --- 调试结束 ---