refactor: restructure project - scripts at root level
This commit is contained in:
@@ -20,6 +20,6 @@ pip install transformers datasets trl peft accelerate bitsandbytes deepspeed
|
||||
|
||||
# Run training
|
||||
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!"
|
||||
@@ -110,8 +110,8 @@ def train(config_path):
|
||||
from datasets import load_dataset
|
||||
import os
|
||||
|
||||
# Get dataset paths - go up to project root
|
||||
repo_root = Path(__file__).parent.parent.parent
|
||||
# Get dataset paths - training/data/ is relative to project root
|
||||
repo_root = Path(__file__).parent
|
||||
train_path = str(repo_root / "training" / "data" / "train.jsonl")
|
||||
test_path = str(repo_root / "training" / "data" / "test.jsonl")
|
||||
print(f"Looking for dataset at: {train_path}")
|
||||
@@ -168,7 +168,7 @@ def train(config_path):
|
||||
|
||||
def main():
|
||||
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")
|
||||
parser.add_argument("--check-only", action="store_true",
|
||||
help="Validate config and dependencies without training")
|
||||
@@ -206,7 +206,7 @@ def check_setup(config_path):
|
||||
|
||||
# Check 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"
|
||||
test_path = repo_root / "training" / "data" / "test.jsonl"
|
||||
|
||||
@@ -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"
|
||||
Reference in New Issue
Block a user