fix: remove max length - #264
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
Confidence Score: 4/5The runtime change appears safe to merge, but the non-blocking compatibility-check and lockfile consistency issues should be corrected. The model2vec call is valid for the locked dependency and implements the stated truncation change; remaining findings concern weakened Python 3.10/3.11 static checking and inconsistent lock-generation metadata rather than an established runtime failure. Files Needing Attention: pyproject.toml, uv.lock
|
|
|
||
| [tool.mypy] | ||
| python_version = "3.10" | ||
| python_version = "3.12" |
There was a problem hiding this comment.
Mypy Target Weakens Compatibility
The package still supports and advertises Python 3.10 and 3.11, but mypy now analyzes the source as Python 3.12. This allows code using 3.12-only typing APIs to pass mypy and potentially fail for supported users on an untested path. Keep the mypy target aligned with the minimum supported Python version, or add a separate Python 3.10 compatibility check.
| python_version = "3.12" | |
| python_version = "3.10" |
There was a problem hiding this comment.
Why did you think I changed it though? Genuine question. Did you think I changed this for fun?
There was a problem hiding this comment.
You’re right — I didn’t think you changed it for fun. I focused on the compatibility implication of the diff and framed it as though the version change lacked justification, even though the PR description explicitly explains why it was needed and that CI covers breakage. That was a poor reading of the context on my part. The narrower point is only that a 3.12 mypy target no longer statically checks 3.10/3.11-specific typing behavior, but given your CI coverage and the intentional tradeoff, this comment isn’t actionable and should be dismissed.
Its latency came from benchmarks.baselines.zvecgrep (63 repos, 3 runs per query), while the published speed figures use speed_benchmark's 19 repos and 5 consecutive runs. Add a zvec-grep bench there and generalise --semble-only into --tools/--repo so one tool can be re-measured without re-running the slow baselines. Re-measured: index 4.0s -> 3.4s, query p50 386ms -> 391ms. The p50 barely moves because direct mode spawns a zg process per query, but the row is now comparable to the others in the table. Also fix _AsymmetricWrapper.encode, which rejected the max_length argument semble has passed since #264 — CodeRankEmbed crashed any full run. Claude-Session: https://claude.ai/code/session_01N5WnCfeaj66TgZTbqm2Zew
This PR sets the max length on the static model to None. This improves performance very slightly, but is a good fix nonetheless. I also had to update our mypy target version to 3.12. This doesn't have any consequences beyond mypy maybe missing typing errors for older python versions. But we'd still catch those in CI if they are causing breakage.