Skip to content

Test README decoding example against API drift - #214

Open
shoemoney wants to merge 1 commit into
deepseek-ai:mainfrom
shoemoney:fix/readme-decode-example
Open

shoemoney wants to merge 1 commit into
deepseek-ai:mainfrom
shoemoney:fix/readme-decode-example

Conversation

@shoemoney

@shoemoney shoemoney commented Aug 24, 2026 •

Copy link
Copy Markdown

A stale README decoding call can bind positional flags to the wrong parameters without raising an error. This adds a stdlib-only regression test that parses the README and the Python interface with ast, checks the decoding call and metadata arguments, and verifies referenced test files exist, including hyphenated filenames.

The current upstream README already corrects the example reported here. After rebasing onto 2e5429f, the diff contains only the regression test; the upstream README stays intact.

Validation: python3 tests/test_readme_example.py passes all three checks. Negative controls fail when positional flags are restored, an obsolete metadata argument is added, or a hyphenated test-file reference is broken. git diff --check passes. GPU kernel tests were not run; this change only adds an AST-based documentation test.

Check the README decoding call against the Python interface without
importing torch or the compiled extension. Reject positional arguments
from softmax_scale onward, obsolete metadata arguments, and missing test
file references, including hyphenated filenames.

The current upstream README already corrects the original stale example,
so keep it unchanged after rebasing onto 2e5429f.
@shoemoney
shoemoney force-pushed the fix/readme-decode-example branch from 1b84669 to d33decb Compare September 30, 2026 04:45
@shoemoney shoemoney changed the title Fix README decode example to match the current flash_mla_with_kvcache signature Test README decoding example against API drift Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant