Download scripts/teaser/edit_post_loop.sh from teawhite/maliang: direct link, hf CLI and curl.
- Browser
- Download file 968 Bytes
-
https://huggingface.co/teawhite/maliang/resolve/main/scripts/teaser/edit_post_loop.sh
- Command line
-
hf download hf://teawhite/maliang/scripts/teaser/edit_post_loop.sh
-
curl -L -o edit_post_loop.sh https://huggingface.co/teawhite/maliang/resolve/main/scripts/teaser/edit_post_loop.sh
968 Bytes
| # teaser · 世界编辑:推完的 case 逐条补 edit_sheet.jpg / edit_score.json(CPU),每 90 s 扫一次;touch <OUT>/post.stop 停。 | |
| # usage: nohup bash scripts/teaser/edit_post_loop.sh [OUT=outputs/teaser/edit/e81] > outputs/teaser/logs/edit/post_loop.log 2>&1 & | |
| M=/opt/dlami/nvme/zhiyangdeng/maliang | |
| OUT=${1:-$M/outputs/teaser/edit/e81} | |
| cd $M | |
| export PYTHONPATH=$M/code/gc25d | |
| while [ ! -f $OUT/post.stop ]; do | |
| ls -d $OUT/cases/*/ 2>/dev/null | while read c; do | |
| [ -f $c/meta.json ] && { [ ! -f $c/edit_score.json ] || [ ! -f $c/edit_sheet.jpg ]; } && echo $c | |
| done > $OUT/.post_todo | |
| n=$(wc -l < $OUT/.post_todo) | |
| if [ "$n" -gt 0 ]; then | |
| cat $OUT/.post_todo | xargs -P 24 -n 4 .venv/bin/python scripts/teaser/compose_edit.py score --procs 1 > /dev/null 2>&1 | |
| cat $OUT/.post_todo | xargs -P 24 -n 4 .venv/bin/python scripts/teaser/compose_edit.py sheet > /dev/null 2>&1 | |
| echo "$(date +%H:%M:%S) post $n" | |
| fi | |
| sleep 90 | |
| done | |