Repository navigation
feat: enforce that a version must be specified - #544
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
danieldk
left a comment
There was a problem hiding this comment.
Something seems to have gone wrong for the cards? They should be templates, but this PR makes them filled.
| @@ -1,56 +1,25 @@ | |||
| --- | |||
| library_name: kernels | |||
| {% if license %}license: {{ license }} | |||
There was a problem hiding this comment.
Shouldn't the license be filled from the metadata, I don't think we want to hardcode it?
There was a problem hiding this comment.
yea 100% I made the mistake of pushing hydrated cards 🤦♂️, fixed in latest changes
|
|
||
| kernel_module = get_kernel("{{ repo_id }}") | ||
| {{ functions[0] }} = kernel_module.{{ functions[0] }} | ||
| kernel_module = get_kernel("kernels-test/cutlass-gemm-tvm-ffi", version=1) |
There was a problem hiding this comment.
I am confused, this should be done by card filling, right? The card should be filled at upload time, not in the repo already.
There was a problem hiding this comment.
same as above, should be resolved in latest changes
| - `{{ layer }}` | ||
| {% endfor %} | ||
| {% endif %} | ||
| - `cutlass_gemm` |
There was a problem hiding this comment.
Same here. Now the list of functions would never update as a kernel is extended.
| return revision | ||
| elif version is not None: | ||
|
|
||
| if version is not None: |
There was a problem hiding this comment.
We can keep this an elif right? To indicate that this is a continuation of the previous condition.
There was a problem hiding this comment.
yes that makes more sense syntactically, updated to use elif in the latest changes
| result = activation.relu(out, x) | ||
| ``` | ||
| """ | ||
| if revision is None and version is None: |
There was a problem hiding this comment.
Why do we need this here? select_revision_or_version gets called below. We should have one place for validation, not the same validation in multiple places.
There was a problem hiding this comment.
good catch, removed in latest
| if revision is not None and version is not None: | ||
| raise ValueError("Either a revision or a version must be specified, not both.") | ||
| if revision is None and version is None: | ||
| raise ValueError("Either a revision or a version must be specified.") | ||
|
|
There was a problem hiding this comment.
Here we need the duplication because the fetching is only lazy (for good reasons).
* feat: enforce that a version must be specified * fix: regenerate example cards and update tvm ffi examples to render correctly * fix: reformat * fix: remove card hydration * fix: prefer elif syntax * fix: remove duplicate check * fix: reformat
Two fixes that together unblock the hub tests: 1. tests.json allowedCudaVersions: 12.x -> 13.0 (matches hub.json and Dockerfile post-v2.20.0). Previously container init failed with 'unsatisfied condition: cuda>=13.0'. 2. requirements.txt: pin kernels<0.15. v0.15.1 (2026-05-29) made LayerRepository require revision or version (huggingface/kernels#544), which transformers>=5 doesn't yet pass. Worker startup raised: ValueError: Either a revision or a version must be specified. Refs: DR-1161
Three coupled fixes needed to make .runpod/tests.json hub tests pass again after the v2.20.0 upgrades: 1. tests.json allowedCudaVersions: 12.x -> 13.0 (Dockerfile and hub.json moved to CUDA 13.0; old values caused 'unsatisfied condition: cuda>=13.0' at container init). 2. requirements.txt kernels<0.15: huggingface/kernels v0.15.1 tightened LayerRepository to require revision or version (huggingface/kernels#544), which transformers >=5 doesn't pass. Worker raised ValueError at import. 0.14.1 is the last safe. 3. tests.json timeout 30000 -> 300000: vLLM cold start (torch.compile + warmup) takes ~60-70s on RTX 4090 for SmolLM2-135M. 30s timeout fired before the worker could respond, producing 'context deadline exceeded'. Refs: DR-1161
Three coupled fixes verified end-to-end on a private fork (TimPietruskyRunPod/worker-vllm v0.1.3 → both hub tests passing): 1. tests.json allowedCudaVersions: 12.x → 13.0 The Dockerfile and hub.json moved to CUDA 13.0 in v2.20.0 (#288, #289), but tests.json was still pinned to 12.5–12.9, so the test pod was scheduled on a GPU with driver < 13.0 and container init failed at the nvidia-container-cli hook with "unsatisfied condition: cuda>=13.0". 2. requirements.txt kernels<0.15 huggingface/kernels v0.15.1 tightened LayerRepository to require a revision or version argument (huggingface/kernels#544). transformers >=5 still constructs LayerRepository(repo_id=..., layer_name=...) without either, so worker import raised ValueError during `from transformers import ...`. 0.14.1 is the last safe release. 3. tests.json timeout 30000 → 300000 vLLM cold start (torch.compile + FlashInfer warmup) on RTX 4090 for SmolLM2-135M takes ~60–70s before the first request can be served. The previous 30s per-test timeout fired before the worker came up, producing "context cancelled or timed out: context deadline exceeded" for every test even when the worker was healthy. 300s gives enough headroom for cold start + the actual inference call. Refs: DR-1161
This PR enforces that a version or revision must be specified in all cases
note: this PR also updates the examples cards to render correctly; updates the
__all__s for some functions, adds a small change for the cli to work on tvm-ffi kernels, and regenerates the cards since there were template placeholders previously. I added these changes to this PR since I updated the card template to include the version and thought the examples should reflect.