#!/bin/bash # usage: run_shard.sh W=~/shotstream_run; source $W/venv/bin/activate; cd $W/ShotStream mkdir -p "$3" CUDA_VISIBLE_DEVICES=$1 PYTHONUNBUFFERED=1 python inference_episode.py --config_path ckpts/shotstream.yaml --resume_ckpt ckpts/shotstream_merged.pt --multi_caption True --data_path "$2" --output_folder "$3" --seed 0 2>&1 | python3 -I $W/scripts/ts.py >> "$4" echo "EXIT_CODE=${PIPESTATUS[0]}" | python3 -I $W/scripts/ts.py >> "$4"