Files
Mika SenghaasandGitHub 4620e257f6 Save sharded weight checkpoints and enable safetensors format (#1058)
* Remove redundant log

* First working version

* Use constants from transformers and adjust debug logs

* Minor

* Fix update weights call on resume

* Make it non breaking

* Rename symbols
2025-10-09 08:49:48 -07:00

36 lines
897 B
Bash
Executable File

#!/usr/bin/env bash
set -e
# Colors for output
GREEN='\033[0;32m'
NC='\033[0m' # No Color
log_info() {
echo -e "${GREEN}[INFO]${NC} $1"
}
# Confirm destructive action
confirm_cleanup() {
echo "This will remove the following paths recursively:"
echo " - **/logs"
echo " - **/checkpoints"
echo " - **/weights"
echo " - **/rollouts"
echo " - **/wandb"
echo " - **/evals"
echo " - .pydantic_config"
while true; do
read -r -p "Proceed? [y/N]: " response
case "$response" in
[yY]|[yY][eE][sS]) break ;;
[nN]|[nN][oO]|"") echo "Aborted."; exit 1 ;;
*) echo "Please answer y or n." ;;
esac
done
}
# Remove logs, checkpoints, weights, rollouts, wandb
confirm_cleanup
rm -rf **/logs **/checkpoints **/weights **/rollouts **/wandb **/evals **/torchrun *.pydantic_config
log_info "Cleaned up!"