delete useless code - #168
Open
superxf wants to merge 1 commit into
Open
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Aug 20, 2026
lterrac
added a commit
to lterrac/pypto-serving
that referenced
this pull request
Aug 20, 2026
hw-native-sys#163 step 7, as much of it as is safe to do while several PRs are open against the files the rest of it would touch. `RuntimeModel.layers` is now defaulted and empty for every loader in the tree, and `LayerWeights` is documented as deprecated with a pointer to what replaced it. Both are kept rather than deleted on purpose: hw-native-sys#168, hw-native-sys#114, hw-native-sys#152, hw-native-sys#145, hw-native-sys#144 and hw-native-sys#132 are open, and some construct a `RuntimeModel`. Removing the field would break them for no gain that cannot wait — it goes when they have landed. `--num-layers-override` in the Qwen example loses its `runtime_model.layers[:n]` slice, which had quietly become a no-op: staging reads `config.num_hidden_layers` and pulls exactly that many layers from the checkpoint, so replacing the config *is* the override now. The knob still works; there is simply nothing eager left to truncate. **The `stage_weights` hook is deliberately not added, and the reason is worth recording because the issue asks for it.** hw-native-sys#163 proposes it "between `_create_runner` and `init_kv_cache`", motivated by Qwen's `DistributedWorker` forking inside `init_kv_cache` — so staging must happen before that. Checking the actual order in `PyptoExecutor.register_model`, it already does: `_compile_model` runs first, and Qwen stages inside it, well ahead of `_create_runner` and the fork. The constraint the hook exists to satisfy is met without it. That leaves the hook as an architectural tidy-up — separating "compile kernels" from "stage weights" into named phases — and it would touch `common/runner/model_runner.py` plus both `npu_runner.py`, which is exactly where the six open PRs are. Adding surface to the most contested files in the repo to formalise a phase ordering that already holds is a poor trade this week. Worth doing after they land, with the timing rationale restated then rather than assumed.
lterrac
added a commit
to lterrac/pypto-serving
that referenced
this pull request
Aug 21, 2026
hw-native-sys#163 step 7, as much of it as is safe to do while several PRs are open against the files the rest of it would touch. `RuntimeModel.layers` is now defaulted and empty for every loader in the tree, and `LayerWeights` is documented as deprecated with a pointer to what replaced it. Both are kept rather than deleted on purpose: hw-native-sys#168, hw-native-sys#114, hw-native-sys#152, hw-native-sys#145, hw-native-sys#144 and hw-native-sys#132 are open, and some construct a `RuntimeModel`. Removing the field would break them for no gain that cannot wait — it goes when they have landed. `--num-layers-override` in the Qwen example loses its `runtime_model.layers[:n]` slice, which had quietly become a no-op: staging reads `config.num_hidden_layers` and pulls exactly that many layers from the checkpoint, so replacing the config *is* the override now. The knob still works; there is simply nothing eager left to truncate. **The `stage_weights` hook is deliberately not added, and the reason is worth recording because the issue asks for it.** hw-native-sys#163 proposes it "between `_create_runner` and `init_kv_cache`", motivated by Qwen's `DistributedWorker` forking inside `init_kv_cache` — so staging must happen before that. Checking the actual order in `PyptoExecutor.register_model`, it already does: `_compile_model` runs first, and Qwen stages inside it, well ahead of `_create_runner` and the fork. The constraint the hook exists to satisfy is met without it. That leaves the hook as an architectural tidy-up — separating "compile kernels" from "stage weights" into named phases — and it would touch `common/runner/model_runner.py` plus both `npu_runner.py`, which is exactly where the six open PRs are. Adding surface to the most contested files in the repo to formalise a phase ordering that already holds is a poor trade this week. Worth doing after they land, with the timing rationale restated then rather than assumed.
lterrac
added a commit
to lterrac/pypto-serving
that referenced
this pull request
Aug 21, 2026
files the rest of it would touch. `RuntimeModel.layers` is now defaulted and empty for every loader in the tree, and `LayerWeights` is documented as deprecated with a pointer to what replaced it. Both are kept rather than deleted on purpose: hw-native-sys#168, hw-native-sys#114, hw-native-sys#152, hw-native-sys#145, hw-native-sys#144 and hw-native-sys#132 are open, and some construct a `RuntimeModel`. Removing the field would break them for no gain that cannot wait — it goes when they have landed. `--num-layers-override` in the Qwen example loses its `runtime_model.layers[:n]` slice, which had quietly become a no-op: staging reads `config.num_hidden_layers` and pulls exactly that many layers from the checkpoint, so replacing the config *is* the override now. The knob still works; there is simply nothing eager left to truncate. **The `stage_weights` hook is deliberately not added, and the reason is worth recording because the issue asks for it.** hw-native-sys#163 proposes it "between `_create_runner` and `init_kv_cache`", motivated by Qwen's `DistributedWorker` forking inside `init_kv_cache` — so staging must happen before that. Checking the actual order in `PyptoExecutor.register_model`, it already does: `_compile_model` runs first, and Qwen stages inside it, well ahead of `_create_runner` and the fork. The constraint the hook exists to satisfy is met without it. That leaves the hook as an architectural tidy-up — separating "compile kernels" from "stage weights" into named phases — and it would touch `common/runner/model_runner.py` plus both `npu_runner.py`, which is exactly where the six open PRs are. Adding surface to the most contested files in the repo to formalise a phase ordering that already holds is a poor trade this week. Worth doing after they land, with the timing rationale restated then rather than assumed.
lterrac
added a commit
to lterrac/pypto-serving
that referenced
this pull request
Aug 24, 2026
files the rest of it would touch. `RuntimeModel.layers` is now defaulted and empty for every loader in the tree, and `LayerWeights` is documented as deprecated with a pointer to what replaced it. Both are kept rather than deleted on purpose: hw-native-sys#168, hw-native-sys#114, hw-native-sys#152, hw-native-sys#145, hw-native-sys#144 and hw-native-sys#132 are open, and some construct a `RuntimeModel`. Removing the field would break them for no gain that cannot wait — it goes when they have landed. `--num-layers-override` in the Qwen example loses its `runtime_model.layers[:n]` slice, which had quietly become a no-op: staging reads `config.num_hidden_layers` and pulls exactly that many layers from the checkpoint, so replacing the config *is* the override now. The knob still works; there is simply nothing eager left to truncate. **The `stage_weights` hook is deliberately not added, and the reason is worth recording because the issue asks for it.** hw-native-sys#163 proposes it "between `_create_runner` and `init_kv_cache`", motivated by Qwen's `DistributedWorker` forking inside `init_kv_cache` — so staging must happen before that. Checking the actual order in `PyptoExecutor.register_model`, it already does: `_compile_model` runs first, and Qwen stages inside it, well ahead of `_create_runner` and the fork. The constraint the hook exists to satisfy is met without it. That leaves the hook as an architectural tidy-up — separating "compile kernels" from "stage weights" into named phases — and it would touch `common/runner/model_runner.py` plus both `npu_runner.py`, which is exactly where the six open PRs are. Adding surface to the most contested files in the repo to formalise a phase ordering that already holds is a poor trade this week. Worth doing after they land, with the timing rationale restated then rather than assumed.
lterrac
added a commit
to lterrac/pypto-serving
that referenced
this pull request
Aug 25, 2026
files the rest of it would touch. `RuntimeModel.layers` is now defaulted and empty for every loader in the tree, and `LayerWeights` is documented as deprecated with a pointer to what replaced it. Both are kept rather than deleted on purpose: hw-native-sys#168, hw-native-sys#114, hw-native-sys#152, hw-native-sys#145, hw-native-sys#144 and hw-native-sys#132 are open, and some construct a `RuntimeModel`. Removing the field would break them for no gain that cannot wait — it goes when they have landed. `--num-layers-override` in the Qwen example loses its `runtime_model.layers[:n]` slice, which had quietly become a no-op: staging reads `config.num_hidden_layers` and pulls exactly that many layers from the checkpoint, so replacing the config *is* the override now. The knob still works; there is simply nothing eager left to truncate. **The `stage_weights` hook is deliberately not added, and the reason is worth recording because the issue asks for it.** hw-native-sys#163 proposes it "between `_create_runner` and `init_kv_cache`", motivated by Qwen's `DistributedWorker` forking inside `init_kv_cache` — so staging must happen before that. Checking the actual order in `PyptoExecutor.register_model`, it already does: `_compile_model` runs first, and Qwen stages inside it, well ahead of `_create_runner` and the fork. The constraint the hook exists to satisfy is met without it. That leaves the hook as an architectural tidy-up — separating "compile kernels" from "stage weights" into named phases — and it would touch `common/runner/model_runner.py` plus both `npu_runner.py`, which is exactly where the six open PRs are. Adding surface to the most contested files in the repo to formalise a phase ordering that already holds is a poor trade this week. Worth doing after they land, with the timing rationale restated then rather than assumed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TokenizerAdapterso the serving layer no longer reaches into the wrapped Hugging Face tokenizer.The OpenAI-compatible endpoint fields and response/SSE shapes are preserved.
Testing
python -m pytest tests/unit -qruff check --config ruff.toml .python tests/lint/check_headers.pypython tests/lint/check_english_only.pygit diff --check