refactor: restructure project - scripts at root level

This commit is contained in:
Christian Medina
2026-07-01 16:39:54 -04:00
parent 293f9caf65
commit cc353b3dea
5 changed files with 5 additions and 16 deletions

View File

@@ -20,6 +20,6 @@ pip install transformers datasets trl peft accelerate bitsandbytes deepspeed
# Run training # Run training
echo "Starting training with accelerate..." echo "Starting training with accelerate..."
accelerate launch --multi_gpu --num_processes 2 training/scripts/train.py --config training/configs/ornith-35b-lora.yaml accelerate launch --multi_gpu --num_processes 2 train.py --config training/configs/ornith-35b-lora.yaml
echo "Training completed!" echo "Training completed!"

View File

@@ -110,8 +110,8 @@ def train(config_path):
from datasets import load_dataset from datasets import load_dataset
import os import os
# Get dataset paths - go up to project root # Get dataset paths - training/data/ is relative to project root
repo_root = Path(__file__).parent.parent.parent repo_root = Path(__file__).parent
train_path = str(repo_root / "training" / "data" / "train.jsonl") train_path = str(repo_root / "training" / "data" / "train.jsonl")
test_path = str(repo_root / "training" / "data" / "test.jsonl") test_path = str(repo_root / "training" / "data" / "test.jsonl")
print(f"Looking for dataset at: {train_path}") print(f"Looking for dataset at: {train_path}")
@@ -168,7 +168,7 @@ def train(config_path):
def main(): def main():
parser = argparse.ArgumentParser(description="Train LoRA adapter") parser = argparse.ArgumentParser(description="Train LoRA adapter")
parser.add_argument("--config", type=str, default="training/configs/ornith-35b-lora.yaml", parser.add_argument("--config", type=str, default="training/configs/ornith-35b-lora.yaml",
help="Training configuration file") help="Training configuration file")
parser.add_argument("--check-only", action="store_true", parser.add_argument("--check-only", action="store_true",
help="Validate config and dependencies without training") help="Validate config and dependencies without training")
@@ -206,7 +206,7 @@ def check_setup(config_path):
# Check dataset files # Check dataset files
print("\n3. Dataset files:") print("\n3. Dataset files:")
repo_root = Path(__file__).parent.parent.parent # Go up to project root repo_root = Path(__file__).parent
train_path = repo_root / "training" / "data" / "train.jsonl" train_path = repo_root / "training" / "data" / "train.jsonl"
test_path = repo_root / "training" / "data" / "test.jsonl" test_path = repo_root / "training" / "data" / "test.jsonl"

View File

@@ -1,11 +0,0 @@
#!/bin/bash
# Run training with distributed setup
set -e
# Install accelerate if not present
pip install -q accelerate
# Launch with accelerate
# Note: Use the dedicated train-on-this-server.sh instead
echo "See train-on-this-server.sh for full setup"