File size: 4,969 Bytes
fee8744
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# Pre-Submission Validation Guide

## Before You Submit

Run the official pre-validation script to ensure your submission passes all checks.

## Prerequisites

Install required tools:

```bash
# Docker (if not already installed)
# https://docs.docker.com/get-docker/

# openenv-core
pip install openenv-core

# curl (usually pre-installed)
```

## Step 1: Deploy to HF Spaces

Before running validation, your Space must be live at a URL like:

```
https://{username}-email-triage.hf.space
```

### Deploy Steps:

```bash
cd d:/Projects/meta-hackathon

# Initialize git
git init
git add .
git commit -m "Initial Email Triage OpenEnv"

# Push to HF Space
git push https://huggingface.co/spaces/{USERNAME}/email-triage main
```

Wait 5-10 minutes for Docker build to complete.

## Step 2: Test Manually (Quick Check)

Before running full validation, do a quick manual test:

```bash
# Test /health endpoint
curl https://{username}-email-triage.hf.space/health

# Should return: {"status":"ok"}

# Test /reset endpoint
curl -X POST https://{username}-email-triage.hf.space/reset

# Should return observation JSON
```

## Step 3: Run Official Validator

Once your Space is live:

```bash
# Option A: Run validator directly
chmod +x validate-submission.sh
./validate-submission.sh https://{username}-email-triage.hf.space d:/Projects/meta-hackathon

# Option B: Download and run
curl -fsSL https://raw.githubusercontent.com/<owner>/<repo>/main/scripts/validate-submission.sh | \
  bash -s -- https://{username}-email-triage.hf.space d:/Projects/meta-hackathon
```

Replace:

- `{username}` with your HuggingFace username
- `<owner>/<repo>` with the official hackathon repo

## What the Validator Checks

### Check 1: HF Space Live

- Pings `https://{url}/reset` endpoint
- Expects HTTP 200 response
- Verifies Space is running

### Check 2: Docker Build

- Runs `docker build` on your Dockerfile
- Timeout: 600 seconds (10 minutes)
- Ensures containerization works locally

### Check 3: openenv validate

- Runs official `openenv validate` command
- Checks openenv.yaml format
- Validates specification compliance

## Expected Validator Output

```
========================================
  OpenEnv Submission Validator
========================================
[HH:MM:SS] Repo:     d:/Projects/meta-hackathon
[HH:MM:SS] Ping URL: https://username-email-triage.hf.space

[HH:MM:SS] Step 1/3: Pinging HF Space ...
[HH:MM:SS] PASSED -- HF Space is live and responds to /reset

[HH:MM:SS] Step 2/3: Running docker build ...
[HH:MM:SS] Found Dockerfile in d:/Projects/meta-hackathon
[HH:MM:SS] PASSED -- Docker build succeeded

[HH:MM:SS] Step 3/3: Running openenv validate ...
[HH:MM:SS] PASSED -- openenv validate passed

========================================
  All 3/3 checks passed!
  Your submission is ready to submit.
========================================
```

## Troubleshooting

### "HF Space not reachable"

- Wait 5-10 minutes for deployment to complete
- Check Space URL is correct
- Verify Space is public (not private)
- Test in browser: `https://{url}/health`

### "Docker build failed"

- Check Dockerfile syntax
- Verify all dependencies in requirements.txt
- Check file paths in Dockerfile
- Test locally: `docker build d:/Projects/meta-hackathon`

### "openenv validate failed"

- Check openenv.yaml format (valid YAML)
- Verify all required fields are present
- Check for syntax errors
- Run: `openenv validate d:/Projects/meta-hackathon`

## Your Project Status

File checklist for validator:

- [x] `Dockerfile` - βœ“ Present and valid
- [x] `openenv.yaml` - βœ“ Complete specification
- [x] `requirements.txt` - βœ“ All dependencies listed
- [x] `inference.py` - βœ“ Mandatory format compliant
- [x] `environment/` - βœ“ Full implementation
- [x] `app.py` - βœ“ Flask API ready
- [x] All endpoints working

## Quick Validation Checklist

Before submitting, verify:

```
[  ] HF Space URL is live and accessible
[  ] /health endpoint returns 200
[  ] /reset endpoint returns observation JSON
[  ] /step endpoint accepts POST with JSON action
[  ] Docker builds successfully locally
[  ] openenv validate passes
[  ] inference.py uses correct stdout format
[  ] All environment variables documented
[  ] README.md is complete
[  ] Score range is [0.0, 1.0]
```

## After Validation Passes

Once all 3 checks pass:

1. βœ“ Your submission is ready
2. βœ“ Submit your Space URL to the hackathon
3. βœ“ Include any required metadata/links
4. βœ“ Done!

## Support

If validator fails:

1. Check the error message
2. Review the "Troubleshooting" section above
3. Fix the issue in your code
4. Re-run validator
5. Repeat until all checks pass

## File Locations

For this project:

- **Dockerfile**: `d:/Projects/meta-hackathon/Dockerfile`
- **openenv.yaml**: `d:/Projects/meta-hackathon/openenv.yaml`
- **requirements.txt**: `d:/Projects/meta-hackathon/requirements.txt`
- **Validation runs from**: `d:/Projects/meta-hackathon`

All present and ready! βœ“