1+ trigger :
2+ - main # Replace with your default branch name
3+
4+ pool :
5+ vmImage : ' ubuntu-latest'
6+
7+ variables :
8+ pythonVersion : ' 3.9'
9+
10+ steps :
11+ # Step 1: Check out the medLLM repository
12+ - task : UsePythonVersion@1
13+ inputs :
14+ versionSpec : ' $(pythonVersion)'
15+ addToPath : true
16+
17+ - task : Checkout@1
18+
19+ # Step 2: Install dependencies for medLLM
20+ - script : |
21+ python -m venv venv
22+ source venv/bin/activate
23+ pip install -r requirements.txt
24+ displayName : ' Install dependencies for medLLM'
25+
26+ # Step 3: Run tests for medLLM
27+ - script : |
28+ source venv/bin/activate
29+ python -m unittest discover -s tests
30+ displayName : ' Run medLLM tests'
31+
32+ # Step 4: Clone BreakYourLLM repository
33+ - script : |
34+ git clone https://github.com/ModelPulse/BreakYourLLM.git
35+ cd BreakYourLLM
36+ python -m venv venv
37+ source venv/bin/activate
38+ pip install -r requirements.txt
39+ displayName : ' Clone and setup BreakYourLLM'
40+
41+ # Step 5: Replace configurations in BreakYourLLM
42+ - script : |
43+ cp medLLM/config/user_config1.json BreakYourLLM/config/config1.json
44+ cp medLLM/config/user_config2.json BreakYourLLM/config/config2.json
45+ displayName : ' Replace BreakYourLLM configurations'
46+
47+ # Step 6: Run main.py in BreakYourLLM
48+ - script : |
49+ cd BreakYourLLM
50+ source venv/bin/activate
51+ python main.py
52+ displayName : ' Run BreakYourLLM main.py'
53+
54+ # Step 7: Check Results
55+ - script : |
56+ if grep -q '"status": "pass"' BreakYourLLM/results/stage5_metric_evaluation.json; then
57+ echo "Build Passed"
58+ else
59+ echo "Build Failed"
60+ exit 1
61+ fi
62+ displayName : ' Check results of BreakYourLLM'
0 commit comments