fix(ingest): correct Wikipedia CPU parsing (fractional TDP, clock ranges, L2 vs L3, family rows) - #90
Merged
Merged
Conversation
…anges, L2 columns and family rows
- '9.5 W' parsed as 5 W and '3.6 W' as 6 W (regex matched the digits after the dot)
- '1.7-2.0 GHz' took 2.0 as the base clock; now base 1.7, boost 2.0
- any 'cache' header mapped to l3_cache_mb, so Atom 'L2 cache' columns became L3
- 'September 2013' collapsed to January 1; month is now kept
- family-tier rows ('Ryzen 5', 'Core i7') and citation markers no longer become SKUs
- quoted section headings are cleaned and '(14 nm)' goes to process_node
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
A dry run of
python -m app.ingest --category cpuproduced candidates with wrong values when checked against the Wikipedia source text:tdp=9.5tdp=3.6freq=1.7-2.0L2 cachecolumnl3_cache_mbSeptember 2013" Denverton " (14 nm)headingDenverton, process_node14 nmRyzen 5/7501 [ 32 ]rowsAMD EPYC tables still mis-parse (model column without the EPYC brand, some shifted cells). They are not fixed here and weren't imported.
tdp_wis an int column, so fractional TDPs round half-up (9.5 → 10). That keeps them within the ±1 W verify tolerance.Test plan
tests/unit/test_ingest_normalize.pyandtests/unit/test_ingest_wikipedia_cpu.pypytest,mypy app,ruff check app testspass