.
This commit is contained in:
23
train.sh
Executable file
23
train.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
# Arguments: script_dir working_dir data_dir train_data_count validate_data_count margin
|
||||
SCRIPT_DIR=${1:-"script"}
|
||||
WORKING_DIR=${2:-"."}
|
||||
DATA_DIR=${3:-"datas"}
|
||||
TRAIN_COUNT=${4:-100}
|
||||
VAL_COUNT=${5:-20}
|
||||
MARGIN=${6:-0.1}
|
||||
|
||||
# 작업 디렉토리가 없으면 생성
|
||||
if [ ! -d "$WORKING_DIR" ]; then
|
||||
echo "Creating directory: $WORKING_DIR"
|
||||
mkdir -p "$WORKING_DIR"
|
||||
fi
|
||||
|
||||
# 피처 추출 (존재 시 생략)
|
||||
if [ ! -f "$WORKING_DIR/features.json" ]; then
|
||||
echo "Extracting features..."
|
||||
bun "$SCRIPT_DIR/extract.ts" "$WORKING_DIR" "$DATA_DIR" "$TRAIN_COUNT" "$VAL_COUNT"
|
||||
fi
|
||||
|
||||
echo "Training model..."
|
||||
python3 "$SCRIPT_DIR/train.py" "$SCRIPT_DIR" "$WORKING_DIR" "$DATA_DIR" "$TRAIN_COUNT" "$VAL_COUNT" "$MARGIN"
|
||||
Reference in New Issue
Block a user