π AISHA RL Training Package - START HERE
Welcome! This is your entry point to the complete AISHA RL training package.
β‘ Quick Decision Tree
I want to train in Google Colab (Recommended)
β Go to: QUICK_START.md
β Then use: AISHA_RL_Training_Colab.ipynb
β Time: ~10 minutes
I want to train locally on my machine
β Go to: QUICK_START.md
β Then use: aisha_rl_training.py
β Time: ~15 minutes
I want to understand everything first
β Go to: COLAB_TRAINING_README.md
β Then read: TRAINING_PIPELINE.md
β Time: ~1 hour
I'm a visual learner
β Go to: TRAINING_PIPELINE.md
β Then read: QUICK_START.md
β Time: ~20 minutes
I need a complete overview
β Go to: PACKAGE_SUMMARY.txt
β Then read: TRAINING_PACKAGE_INDEX.md
β Time: ~15 minutes
π What's in This Package?
π― Main Files (Use These)
- AISHA_RL_Training_Colab.ipynb - Jupyter notebook for Google Colab
- aisha_rl_training.py - Standalone Python script for local training
π Documentation (Read These)
- QUICK_START.md - 5-minute quick start guide
- COLAB_TRAINING_README.md - Comprehensive documentation
- TRAINING_PIPELINE.md - Visual diagrams and explanations
- TRAINING_PACKAGE_INDEX.md - Complete package index
- PACKAGE_SUMMARY.txt - Executive summary
π§ Supporting Files (Reference)
- AISHA_TRAINING_NOTEBOOK.md - Markdown source for notebook
- convert_to_notebook.py - Utility to convert markdown to Jupyter
- MANIFEST.md - Complete package manifest
- FILES_GENERATED.txt - List of all generated files
- START_HERE.md - This file
β¨ What You'll Get
After running the training, you'll have:
- reward_curve.png - Shows your training progress
- loss_curve.png - Shows loss convergence
- Console output - Detailed metrics and summary
Expected improvement: 50-100% over baseline
π― The 3-Step Process
Step 1: Setup (2 minutes)
- Get HuggingFace token from https://huggingface.co/settings/tokens
- For Colab: Add token to Colab Secrets (π icon)
- For Local: Set environment variable
Step 2: Run (10-15 minutes)
- For Colab: Open notebook and run all cells (Ctrl+F9)
- For Local: Run
python aisha_rl_training.py
Step 3: Analyze (5 minutes)
- Download PNG plots
- Review metrics
- Celebrate your trained agent! π
π What Happens During Training
Training Loop (5 episodes):
ββ Episode 1: Agent learns basic actions
ββ Episode 2: Agent improves strategy
ββ Episode 3: Agent explores more
ββ Episode 4: Agent converges
ββ Episode 5: Agent stabilizes
Evaluation:
ββ Baseline (random agent): 5 episodes
ββ Trained agent: 5 episodes
Comparison:
ββ Shows improvement percentage
Visualization:
ββ reward_curve.png (training progress)
ββ loss_curve.png (loss convergence)
π Key Features
β
Live Environment - Connects to real HF Space
β
Small Model - Qwen1.5-1.8B (fits in Colab free tier)
β
GRPO Training - Group Relative Policy Optimization
β
Easy Scenario - 2 hosts, 3 vulnerabilities
β
Baseline Comparison - See your improvement
β
Beautiful Plots - PNG visualizations
β
Comprehensive Docs - Everything explained
β
No Manual Steps - Fully automated
π Getting Started Now
For Google Colab Users:
- Click: AISHA_RL_Training_Colab.ipynb
- Upload to Google Colab
- Add HF_TOKEN to Colab Secrets
- Run all cells (Ctrl+F9)
- Download PNG plots
For Local Python Users:
- Open terminal
- Set environment variables:
export HF_TOKEN="your_token" export API_BASE_URL="https://anshumanatrey-security-audit-env.hf.space" - Run:
python aisha_rl_training.py - Check PNG plots in current directory
β Common Questions
Q: Do I need a GPU?
A: No, but it's faster. CPU works fine for this small model.
Q: How long does it take?
A: ~10 minutes in Colab, ~15 minutes locally.
Q: What if I get an error?
A: Check QUICK_START.md troubleshooting section.
Q: Can I use a different model?
A: Yes! Change MODEL_NAME in the notebook/script.
Q: Can I train on harder scenarios?
A: Yes! Change scenario_id to "medium" or "hard".
Q: How do I understand the code?
A: Read COLAB_TRAINING_README.md for detailed explanations.
π Documentation Map
START_HERE.md (You are here)
β
QUICK_START.md (5 min read)
ββ For Colab users β AISHA_RL_Training_Colab.ipynb
ββ For local users β aisha_rl_training.py
For deeper understanding:
ββ COLAB_TRAINING_README.md (comprehensive guide)
ββ TRAINING_PIPELINE.md (visual explanations)
ββ TRAINING_PACKAGE_INDEX.md (package overview)
ββ PACKAGE_SUMMARY.txt (executive summary)
For reference:
ββ MANIFEST.md (package manifest)
ββ FILES_GENERATED.txt (file listing)
ββ AISHA_TRAINING_NOTEBOOK.md (notebook source)
π Learning Path
Beginner (Just want to run it)
- Read: QUICK_START.md (5 min)
- Run: Notebook or script (10 min)
- Done! β
Intermediate (Want to understand it)
- Read: QUICK_START.md (5 min)
- Read: COLAB_TRAINING_README.md (20 min)
- Run: Notebook or script (10 min)
- Experiment: Try different scenarios (10 min)
- Done! β
Advanced (Want to customize it)
- Read: COLAB_TRAINING_README.md (20 min)
- Read: TRAINING_PIPELINE.md (15 min)
- Study: Notebook cells (30 min)
- Modify: Hyperparameters and model (20 min)
- Run: Custom training (10 min)
- Done! β
π― Expected Results
Baseline (Random Agent)
- Average Score: ~0.20-0.30
- Behavior: Random actions
Trained Agent (After 5 Episodes)
- Average Score: ~0.35-0.50
- Improvement: 50-100%
Loss Convergence
- Initial: ~0.80-0.90
- Final: ~0.30-0.50
- Trend: Decreasing β
π§ System Requirements
For Google Colab
- β Google account
- β HuggingFace token (free)
- β Internet connection
- β ~10 minutes
For Local Machine
- β Python 3.8+
- β pip or conda
- β HuggingFace token (free)
- β GPU recommended (CPU works)
- β ~15 minutes
π‘ Pro Tips
- First time? Start with QUICK_START.md
- Visual learner? Check TRAINING_PIPELINE.md
- Want details? Read COLAB_TRAINING_README.md
- Need help? See troubleshooting sections
- Ready to code? Open the notebook/script
π Troubleshooting
Connection Error
β Check HF Space status, wait 30 seconds, retry
Out of Memory
β Use CPU instead of GPU
Token Not Found
β Add HF_TOKEN to Colab Secrets (π icon)
Model Download Fails
β Check internet, verify token, retry
For more help: See QUICK_START.md
π Need Help?
- Quick questions? β Check QUICK_START.md
- Want details? β Read COLAB_TRAINING_README.md
- Visual explanation? β See TRAINING_PIPELINE.md
- Package overview? β Check PACKAGE_SUMMARY.txt
β Checklist Before Starting
- I have a HuggingFace token
- I chose Colab or Local
- I read QUICK_START.md
- I have internet connection
- I have ~10-15 minutes
π Ready?
Choose Your Path:
π Google Colab (Recommended)
- Open AISHA_RL_Training_Colab.ipynb
- Upload to Colab
- Add HF_TOKEN to Secrets
- Run all cells
- Download plots
π» Local Python
- Set HF_TOKEN environment variable
- Run:
python aisha_rl_training.py - Check PNG plots
π Learn First
- Read QUICK_START.md
- Read COLAB_TRAINING_README.md
- Then run the notebook/script
π Let's Go!
Next Step: Open QUICK_START.md
Time to Results: ~10-15 minutes
Expected Outcome: Trained RL agent + 2 PNG plots
Happy training! π
Questions? Check the documentation files above.
Ready? Start with QUICK_START.md!