Spaces:
Sleeping
Sleeping
File size: 2,837 Bytes
59906eb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | # Phase 2 Grading Validation - Fix Checklist
## β
Issue Resolved
### Previous Failure Message:
```
β Not enough tasks with graders Β· One or more task scores are out of range
Why it failed:
- Your submission must include at least 3 tasks with graders.
- Each task's score must be strictly between 0 and 1 (not 0.0 and not 1.0).
```
## β
Requirements Met
### Requirement 1: At least 3 tasks with graders
- β
task_easy_001 (Easy difficulty)
- β
task_medium_001 (Medium difficulty)
- β
task_hard_001 (Hard difficulty)
- β
task_extreme_001 (Extreme difficulty - bonus)
**Total: 4 tasks with graders** (requirement: minimum 3)
### Requirement 2: Task scores strictly in (0, 1)
All task graders now return scores strictly between 0 and 1 (exclusive):
| Scenario | Score | Valid |
|----------|-------|-------|
| Perfect match | 0.9500 | β
|
| Partial match | 0.1250 - 0.9000 | β
|
| Empty/Wrong answer | 0.0500 | β
|
| Error cases | 0.0500 | β
|
**Valid range: (0.0500, 0.9500)**
## β
Changes Made
### 1. app/grader.py - TaskGrader.grade_task()
**Lines: 12-52**
Changed from: `[0.0, 1.0]` range (inclusive)
Changed to: `[0.05, 0.95]` range (exclusive bounds of 0 and 1)
**Key modifications:**
- Line 33: `return 0.05` (was: `return 0.0`)
- Line 39: `return 0.95 if ... else 0.05` (was: `return 1.0 if ... else 0.0`)
- Line 47: `score = max(0.05, ...)` (was: `max(0.0, ...)`)
- Line 52: `return clamped = max(0.05, min(0.95, score))` (ensures [0.05, 0.95])
### 2. inference.py - Score assignment
**Lines: 261, 347**
Changed fallback and error scores from `0.0` to `0.05`:
- Line 261: `score = 0.05` when no final answer
- Line 347: `scores[task_id] = 0.05` for error cases
## β
Validation Passed
Comprehensive testing shows:
- β
9/9 test cases produce valid scores in (0, 1)
- β
Score range: [0.0500, 0.9500]
- β
All task types (easy, medium, hard, extreme) tested
- β
Edge cases handled (empty, wrong, partial, perfect answers)
## β
Next Steps
1. **Commit changes to GitHub:**
```bash
git add app/grader.py inference.py
git commit -m "Fix Phase 2 grading validation: ensure task scores strictly between 0 and 1"
git push
```
2. **Resubmit to Meta Hackathon:**
- Submit before: 8 April 2026, 11:59 PM IST
- Only latest submission will be evaluated
- Should now pass Phase 2 validation
3. **Expected Result:**
- β
Docker build passes (fixed in previous submission)
- β
Grading validation passes (fixed with this submission)
- Proceed to Phase 3 validation
## Files Modified
- `/Users/niharshah/Desktop/Meta Hackathon/app/grader.py`
- `/Users/niharshah/Desktop/Meta Hackathon/inference.py`
## Deadline Status
- β° Round 1 closes: 8 April 2026, 11:59 PM IST
- β° Current submission time: 7 April 2026 (within deadline)
- β
Ready for resubmission
|