Skip to content

Commit 7ce2cf5

Browse files
committed
docs: added "conventions" and a user story to update the code
1 parent 9b901b9 commit 7ce2cf5

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

docs/conventions.md

Whitespace-only changes.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# User Story: Migrate Worker-SGLang to Updated Structure
2+
3+
## Overview
4+
5+
Migrate the unmaintained `worker-sglang` to use the updated and maintained structure from `sglang/.runpod`, ensuring compatibility with RunPod Hub while preserving any valuable additions.
6+
7+
## Current State
8+
9+
- **worker-sglang**: Outdated structure with `builder/` and `src/` folders, unmaintained
10+
- **sglang/.runpod**: Updated, maintained structure with modern RunPod Hub compatibility
11+
12+
## Goal
13+
14+
Update `worker-sglang` to match the modern structure while preserving functionality and ensuring RunPod Hub compatibility.
15+
16+
## Acceptance Criteria
17+
18+
### Structure Migration
19+
20+
- [ ] Remove deprecated `builder/` folder and its contents
21+
- [ ] Remove deprecated `src/` folder and its contents
22+
- [ ] Move core files from `sglang/.runpod/` to `worker-sglang/` root:
23+
- `handler.py`
24+
- `engine.py`
25+
- `utils.py`
26+
- `download_model.py`
27+
- `Dockerfile`
28+
- `docker-compose.yml`
29+
- `requirements.txt`
30+
- `test_input.json`
31+
- `public/` directory
32+
33+
### RunPod Hub Integration
34+
35+
- [ ] Create `worker-sglang/.runpod/` folder containing only:
36+
- `hub.json` (RunPod Hub configuration)
37+
- `tests.json` (Hub testing configuration)
38+
- [ ] Remove old `worker-config.json` (replaced by `hub.json`)
39+
40+
### Preservation & Compatibility
41+
42+
- [ ] Compare current `worker-sglang` files with `sglang/.runpod` equivalents
43+
- [ ] Preserve any valuable additions or configurations from current `worker-sglang`
44+
- [ ] Ensure environment variable compatibility is maintained
45+
- [ ] Update any worker-specific customizations if needed
46+
47+
### Validation
48+
49+
- [ ] Verify Docker build succeeds with new structure
50+
- [ ] Confirm RunPod Hub compatibility with new `hub.json`
51+
- [ ] Test that all original functionality is preserved
52+
53+
## Files to Review for Differences
54+
55+
- Compare `worker-sglang/src/handler.py` vs `sglang/.runpod/handler.py`
56+
- Compare `worker-sglang/src/engine.py` vs `sglang/.runpod/engine.py`
57+
- Compare `worker-sglang/Dockerfile` vs `sglang/.runpod/Dockerfile`
58+
- Review `worker-sglang/worker-config.json` vs `sglang/.runpod/hub.json` for missing configurations
59+
60+
## Success Metrics
61+
62+
- Worker builds successfully with new structure
63+
- All original environment variables and configurations work
64+
- RunPod Hub compatibility maintained
65+
- Code is cleaner and follows modern structure

0 commit comments

Comments
 (0)