Repository navigation
chore(optimizations): remove legacy pflash and spark Python packages - #1117
Conversation
davide221
left a comment
There was a problem hiding this comment.
Code review
No issues found. Checked for bugs and logic errors in the changed code.
Reviewed 345bba6d · 0 candidate issues checked, kept at ≥70% confidence · add the code-review label to review again
There was a problem hiding this comment.
All reported issues were addressed across 17 files
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
View guided diff | Re-trigger cubic
345bba6 to
7426c8b
Compare
Docker prebuilds failed on
|
7426c8b to
839942f
Compare
Both PFlash v2 and Luce Spark run in-process in C++ inside luce_server (server/src/pflash, server/src/server/pflash_unified.cpp, server/src/common, server/src/server, server/src/laguna, and server/src/qwen35moe). The standalone Python packages under optimizations/pflash/ and optimizations/spark/ (legacy test_dflash stdin wrappers and offline bench/calibration scripts) are unused by luce_server, eval scripts, or harnesses. Keep their READMEs, RESULTS, and media as documentation, add optimizations/README.md to clarify where production implementations live, remove pflash from pyproject.toml, uv.lock, Dockerfiles, and CI, align the remaining docs with current luce_server behavior, and add the missing <cstddef> include in server/src/common/concurrency/paged_kv_pool.h so the GCC 11 CUDA Docker build succeeds.
839942f to
6462901
Compare
Why
PFlash v2 and Luce Spark both run in-process in C++ inside
luce_server. The standalone Python packages inoptimizations/pflash/(DflashClient,bench_niah_cpp.py,niah_gen.py) andoptimizations/spark/(_daemon.py,calibrate.py,bench.py,train_pregate.py) were legacytest_dflashstdin wrappers with zero callers inserver/orharness/, yetpflashwas still installed into every uv workspace, Docker image, and pytest run.Change
optimizations/pflash/{pflash,tests,pyproject.toml}andoptimizations/spark/{spark,pyproject.toml}while keeping each directory'sREADME.md,RESULTS.md, and media.pflashfrom workspace, Docker, and CI: Removepflashfrompyproject.toml(dependencies, ruff exclude, pytesttestpaths, uv workspace members/sources), regenerateuv.lock(removes onlypflash v0.3.0;luceandtorchstill supplytransformersandsetuptools), dropCOPY optimizations/pflashlayers fromDockerfileandDockerfile.rocm, and update.github/workflows/ci.yml,.github/ci/test_ci_plan.py,CONTRIBUTING.md,variables.md, andserver/test/python/test_full_compress_cache.py.optimizations/README.mdmapping each subdirectory to its runtime owner inserver/src/(and notingmegakernel/as the only compiled subproject here).luce_server: Updateoptimizations/pflash/README.md(direct download of publishedQwen3.5-0.8B-BF16.ggufand DFlashconfig.json,seg-scoring-head.gguf+--pflash on, aggregate region admission rules,--fa-windowvsLUCE_FA_WINDOW,test_dflash --daemonstdin/stream-fd protocol, supported backends exposingpflash_gives_candidate_scores(), citation URL),optimizations/spark/README.md(--spark-vramtarget semantics, first-boot history bootstrap, citation URL), and label historical script references inserver/RESULTS.md,optimizations/spark/RESULTS.md, andserver/docs/laguna_integration_plan.md.#include <cstddef>and usestd::size_tincontiguous_block_run(server/src/common/concurrency/paged_kv_pool.h), fixing the pre-existingmainGCC 11 compile failure inDocker prebuilds / cuda12.optimizations/megakernel/,optimizations/image_gen/,optimizations/kvflash/,optimizations/paged_attention/, and server runtime behavior.Measured / Tested
uv lock --check --offline: passed (85 packages;uv.lockdiff removes onlypflash v0.3.0).ruff check: passed.pytest .github/ci/: 122 passed (includingtest_ci_plan.py,test_docs_paths.py,test_check_commit_messages.py)..mdfiles: 0 broken links.test_paged_kv_pool(g++ -std=c++17): 18 passed, plus standalone syntax check onpaged_kv_pool.h.Docker prebuilds / rocm,uv workspace,Build megakernel,Commit messages,CodeQL,GPU tests (DGX GB10), andBuild Windows (ROCm HIP)all passed.#include <cstddef>/std::size_ttopaged_kv_pool.h, with no runtime behavior change.Review
high) andcubic-dev-ai: replaced missingconvert_hf_to_gguf.pywith publishedQwen3.5-0.8B-BF16.gguf, added DFlashconfig.jsondownload, fixedseg-scoring-head.ggufpath and--pflash on, corrected aggregate region admission (active tool outputs only aggregate within the current turn), fixedtest_dflash --daemonlaunch/command/--stream-fdprotocol, separated--fa-window(luce_server) fromLUCE_FA_WINDOW(test_dflash/ entrypoint), updated supported PFlash backends (pflash_gives_candidate_scores(), addinginkling2and excludinglaguna), fixed Spark--spark-vram/ history bootstrap wording, updatedCONTRIBUTING.mdandoptimizations/README.mdownership links, fixed 404 citation URLs, and labeled historical scripts inserver/RESULTS.md,optimizations/spark/RESULTS.md, andserver/docs/laguna_integration_plan.md.#include <cstddef>fix inserver/src/common/concurrency/paged_kv_pool.hto unblockDocker prebuilds / cuda12.Cleanup
tidy(Standard + Deslop): verified all hunks, lockfile diff, and relative links; no extra code or slop found.prune-tests/test-audit: deletedoptimizations/pflash/tests/test_dflash_client.pywithDflashClient; audited.github/ci/test_ci_plan.pyandserver/test/python/test_full_compress_cache.py— all remaining tests enforce live contracts (0 deletions).Limits
Docker prebuilds / cuda12run to confirm the full CUDA image build and runtimeuv syncpass end to end.