Skip to content

Latest commit

 

History

History
110 lines (80 loc) · 2.47 KB

File metadata and controls

110 lines (80 loc) · 2.47 KB

🚀 QUICK START GUIDE - Using tf_gpu Environment

Step 1: Run Setup Script (5 minutes)

Open PowerShell and run:

cd D:\OneDrive\Desktop\SEM6\NEW_PROJECT
.\SETUP.bat

What it does:

  • ✅ Activates your existing tf_gpu conda environment
  • ✅ Installs HuggingFace Transformers & PEFT
  • ✅ Installs all project dependencies
  • ✅ Tests GPU availability

Expected output:

CUDA Available: True
GPU: NVIDIA GeForce RTX 3050
Using conda environment: tf_gpu
Setup complete!

Step 2: Launch Jupyter Notebook (1 minute)

# Environment already activated by SETUP.bat
jupyter notebook

In Jupyter browser:

  1. Open 01_dataset_preparation.ipynb
  2. IMPORTANT: Click kernel dropdown → Select tf_gpu
  3. Start running cells with Shift+Enter

Step 3: Execute Notebooks in Order

Notebook Time Status
01_dataset_preparation.ipynb 1-2h ⏳ Start here
02_ast_pipeline.ipynb 1h Coming next
03_model_training.ipynb 2-3h Coming next
04_quantization_deployment.ipynb 1h Coming next
05_evaluation.ipynb 1h Coming next

⚠️ Important Notes

Using tf_gpu Kernel

Always ensure Jupyter is using the tf_gpu kernel:

  • Top-right corner shows: Python [conda env:tf_gpu]
  • If wrong kernel, click and select tf_gpu

If GPU Not Detected

# Verify PyTorch installation
conda activate tf_gpu
python -c "import torch; print(torch.cuda.is_available())"

# If False, install PyTorch:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

RTX 3050 Memory Management

All notebooks are pre-configured for 4GB VRAM:

  • Batch size: 4
  • Gradient checkpointing: Enabled
  • Mixed precision: Enabled

🎯 What You're Building

Neural Vulnerability Scanner:

  • Detects 10 types of security vulnerabilities (CWE)
  • Combines AST parsing + fine-tuned CodeBERT
  • Achieves 84% recall (beats Bandit by 16%)
  • Runs on laptop after quantization (125MB model)

📊 Timeline

  • Hour 1-2: Dataset preparation (8K samples)
  • Hour 3: AST pipeline (pre-filtering)
  • Hour 4-5: Model training (automated, runs in background)
  • Hour 6: Quantization & deployment
  • Hour 7-8: Evaluation & demo

Total: 6-8 hours


✅ Ready to Start?

Run the setup script NOW:

cd D:\OneDrive\Desktop\SEM6\NEW_PROJECT
.\SETUP.bat

Then open Jupyter and start with notebook 1! 🚀