You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PYTHONPATH=src RUNPOD_TEST_INPUT="$(cat test_input.json)" uv run python src/handler.py
73
-
74
-
# Test with other test files
75
-
PYTHONPATH=src RUNPOD_TEST_INPUT="$(cat test_class_input.json)" uv run python src/handler.py
76
-
PYTHONPATH=src RUNPOD_TEST_INPUT="$(cat test_hf_input.json)" uv run python src/handler.py
71
+
# Test handler locally with test*.json
72
+
make test-handler
77
73
```
78
74
79
75
### Submodule Management
@@ -122,6 +118,14 @@ The handler automatically detects and utilizes `/runpod-volume` for persistent w
122
118
-**Optimized Resource Usage**: Shared caches across multiple endpoints while maintaining isolation
123
119
-**ML Model Efficiency**: Large HF models cached on volume prevent "No space left on device" errors
124
120
121
+
### HuggingFace Model Acceleration
122
+
The system automatically leverages HuggingFace's native acceleration features:
123
+
-**hf_transfer**: Accelerated downloads for large model files when available
124
+
-**hf_xet**: Automatic chunk-level deduplication and incremental downloads (huggingface_hub>=0.32.0)
125
+
-**Native Integration**: Uses HF Hub's `snapshot_download()` for optimal caching and acceleration
126
+
-**Transparent Operation**: No code changes needed - acceleration is automatic when repositories support it
127
+
-**Token Support**: Configured via `HF_TOKEN` environment variable for private repositories
128
+
125
129
## Configuration
126
130
127
131
### Environment Variables
@@ -160,11 +164,6 @@ make test-integration # Run integration tests only
160
164
make test-coverage # Run tests with coverage report
161
165
make test-fast # Run tests with fail-fast mode
162
166
make test-handler # Test handler locally with all test_*.json files (same as CI)
163
-
164
-
# Test handler locally with specific test files
165
-
PYTHONPATH=src RUNPOD_TEST_INPUT="$(cat test_input.json)" uv run python src/handler.py
166
-
PYTHONPATH=src RUNPOD_TEST_INPUT="$(cat test_class_input.json)" uv run python src/handler.py
167
-
PYTHONPATH=src RUNPOD_TEST_INPUT="$(cat test_hf_input.json)" uv run python src/handler.py
168
167
```
169
168
170
169
### Testing Framework
@@ -261,3 +260,8 @@ Configure these in GitHub repository settings:
261
260
262
261
### Docker Guidelines
263
262
- Docker container should never refer to src/
263
+
264
+
- Always run `make quality-check` before pronouncing you have finished your work
265
+
- Always use `git mv` when moving existing files around
266
+
267
+
- Run the command `make test-handler` to run checks on test files. Do not try to run it one by one like `Bash(env RUNPOD_TEST_INPUT="$(cat test_input.json)" PYTHONPATH=. uv run python handler.py)`
0 commit comments