vickie02736's picture
Add files using upload-large-folder tool
f6f133a verified
raw
history blame
1.8 kB
#!/bin/bash
#SBATCH --job-name=m_0_6k # 作业名称
#SBATCH --account=PAS2490 # Project ID
#SBATCH --nodes=1 # 节点数
#SBATCH --ntasks-per-node=1 # 每个节点的任务数
#SBATCH --cpus-per-task=16 # 每个任务使用的 CPU 核心数
#SBATCH --gpus-per-node=1 # GPU per node
#SBATCH --mem=200G # 内存限制
#SBATCH --time=120:00:00 # 作业运行时间限制
#SBATCH --mail-type=BEGIN,END,FAIL
#SBATCH --mail-user=uceckz0@ucl.ac.uk
source $HOME/miniconda3/etc/profile.d/conda.sh
conda activate mace_env
convert_to_seconds() {
date -d "${1//_/ }" +%s
}
start_time=$(date +%Y-%m-%d_%H:%M:%S)
echo "Train start time: $start_time"
mace_run_train \
--name="MACE_model" \
--train_file="../trainset.xyz" \
--num_workers=16 \
--valid_fraction=0.0833 \
--test_file="../testset.xyz" \
--config_type_weights='{"Default":1.0}' \
--E0s='{1:-13.663181292231226, 6:-1029.2809654211628, 7:-1484.1187695035828, 8:-2042.0330099956639, 30:-500.123456789}' \
--model="MACE" \
--hidden_irreps='128x0e + 128x1o' \
--r_max=5.0 \
--batch_size=10 \
--lr=0.0001 \
--max_num_epochs=500 \
--swa \
--ema \
--ema_decay=0.99 \
--amsgrad \
--restart_latest \
--device=cuda \
end_time=$(date +%Y-%m-%d_%H:%M:%S)
echo "Train end time: $end_time"
start_seconds=$(convert_to_seconds "$start_time")
end_seconds=$(convert_to_seconds "$end_time")
time_difference=$((end_seconds - start_seconds))
echo "Training duration: $time_difference seconds"
duration_h=$((time_difference / 3600))
duration_m=$(((time_difference % 3600) / 60))
duration_s=$((time_difference % 60))
echo "Training duration: ${duration_h}h ${duration_m}m ${duration_s}s"