Merge pull request #130 from hpcaitech/hotfix/eval_loss_task

eval_task_sep
This commit is contained in:
Shen Chenhui 2024-06-11 15:47:35 +08:00 committed by GitHub
commit 75afe4dcb4
2 changed files with 6 additions and 6 deletions

View file

@ -20,9 +20,9 @@ echo "Logging to $LOG_BASE"
GPUS=(3 4 5 6 7)
RESOLUTION=(144p 240p 360p 480p 720p)
CUDA_VISIBLE_DEVICES=0 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 0 --end-index 3 >${LOG_BASE}/img_0.log 2>&1 &
CUDA_VISIBLE_DEVICES=1 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 3 --end-index 5 >${LOG_BASE}/img_1.log 2>&1 &
CUDA_VISIBLE_DEVICES=2 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 5 >${LOG_BASE}/img_2.log 2>&1 &
CUDA_VISIBLE_DEVICES=0 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 0 --end-index 5 >${LOG_BASE}/img_0.log 2>&1 &
CUDA_VISIBLE_DEVICES=1 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 5 --end-index 6 >${LOG_BASE}/img_1.log 2>&1 &
CUDA_VISIBLE_DEVICES=2 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 6 >${LOG_BASE}/img_2.log 2>&1 &
for i in "${!GPUS[@]}"; do

View file

@ -3,7 +3,6 @@ import cv2 # isort:skip
import argparse
import os
import subprocess
import time
from functools import partial
import pandas as pd
@ -43,6 +42,8 @@ def process_single_row(row, args):
if "relpath" in row:
save_dir = os.path.dirname(os.path.join(args.save_dir, row["relpath"]))
os.makedirs(save_dir, exist_ok=True)
else:
save_dir = args.save_dir
shorter_size = args.shorter_size
if (shorter_size is not None) and ("height" in row) and ("width" in row):
@ -171,11 +172,10 @@ def main():
args = parse_args()
meta_path = args.meta_path
if not os.path.exists(meta_path):
print(f"Meta file \'{meta_path}\' not found. Exit.")
print(f"Meta file '{meta_path}' not found. Exit.")
exit()
# create logger
logger = None
os.makedirs(args.save_dir, exist_ok=True)
# initialize pandarallel