模型检查
This commit is contained in:
@@ -268,6 +268,12 @@ def main_dev(opt):
|
||||
opt.ckpt = f'/data/ckpt/{model_name}.ckpt'
|
||||
opt.device = 'cuda'
|
||||
|
||||
# 检查模型文件是否存在
|
||||
if not os.path.exists(opt.ckpt):
|
||||
print(f"模型文件不存在: {opt.ckpt}, 结束此任务")
|
||||
update_task_status(task, "error", 0)
|
||||
continue
|
||||
|
||||
# 检查yaml文件是否存在
|
||||
if not os.path.exists(opt.config):
|
||||
print(f"yaml文件不存在: {opt.config}, 将使用默认配置")
|
||||
|
Reference in New Issue
Block a user