Download 10_paper_strengthening/p2_test_split_diffusion.sh from Ouzhang/local-script-backup: direct link, hf CLI and curl.
- Browser
- Download file 1.6 kB
-
https://huggingface.co/datasets/Ouzhang/local-script-backup/resolve/main/10_paper_strengthening/p2_test_split_diffusion.sh
- Command line
-
hf download hf://datasets/Ouzhang/local-script-backup/10_paper_strengthening/p2_test_split_diffusion.sh
-
curl -L -o p2_test_split_diffusion.sh https://huggingface.co/datasets/Ouzhang/local-script-backup/resolve/main/10_paper_strengthening/p2_test_split_diffusion.sh
1.6 kB
| set -euo pipefail | |
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| source "${SCRIPT_DIR}/../00_setup/env.sh" | |
| : "${DEEPSTARR_DIR:?Set DEEPSTARR_DIR to the local DeepSTARR parquet directory.}" | |
| : "${DIFFUSION_MODEL:?Set DIFFUSION_MODEL to the trained diffusion saved model directory.}" | |
| : "${GENERANNO_BASE_MODEL:?Set GENERANNO_BASE_MODEL to the local GENERanno model.}" | |
| : "${PREDICTOR_MODEL:?Set PREDICTOR_MODEL to the trained predictor best_model directory.}" | |
| export NUM_PER_BUCKET="${NUM_PER_BUCKET:-128}" | |
| export NUM_DIFFUSION_STEPS="${NUM_DIFFUSION_STEPS:-64}" | |
| export DIFFUSION_EVAL_BATCH_SIZE="${DIFFUSION_EVAL_BATCH_SIZE:-512}" | |
| export PREDICTOR_SCORE_BATCH_SIZE="${PREDICTOR_SCORE_BATCH_SIZE:-64}" | |
| cd "${GENERANNO_DIR}" | |
| python3 src/tasks/downstream/discrete_diffusion_evaluate.py \ | |
| --diffusion_model "${DIFFUSION_MODEL}" \ | |
| --base_model_for_code "${GENERANNO_BASE_MODEL}" \ | |
| --dataset_dir "${DEEPSTARR_DIR}" \ | |
| --predictor_model "${PREDICTOR_MODEL}" \ | |
| --split test \ | |
| --conditioned \ | |
| --num_per_bucket "${NUM_PER_BUCKET}" \ | |
| --sequence_length "${SEQUENCE_LENGTH:-246}" \ | |
| --num_diffusion_steps "${NUM_DIFFUSION_STEPS}" \ | |
| --batch_size "${DIFFUSION_EVAL_BATCH_SIZE}" \ | |
| --predictor_batch_size "${PREDICTOR_SCORE_BATCH_SIZE}" \ | |
| --max_length "${DIFFUSION_MAX_LENGTH:-256}" \ | |
| --temperature "${DIFFUSION_TEMPERATURE:-1.0}" \ | |
| --bf16 \ | |
| --attn_implementation "${ATTN_IMPLEMENTATION:-sdpa}" \ | |
| --output_dir "${RESULT_ROOT}/diffusion_test_predictor" | |
| echo "P2 test split diffusion evaluation completed under ${RESULT_ROOT}/diffusion_test_predictor" | |