Repository navigation
Conversation
hash_from_json_repr keeps only 5 hex digits (20 bits). remove_duplicated_bench_cases keys cases by that short hash, so two different cases with the same prefix silently replace each other. Running configs/regular, configs/weekly and configs/experiments together has 1679 distinct cases but kept 1678: ExtraTreesClassifier/mnist and a raft NearestNeighbors/fashion_mnist case share a9f34. Use the full digest for deduplication and for bench_case_filter. The short hash is still used where it is only part of a display name. Fixes IntelPython#228 Signed-off-by: Dezhen Lu <[email protected]>
This branch has not been deployed
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.
Description
Fixes #228.
remove_duplicated_bench_caseskeyed bench cases byhash_from_json_repr, which keeps only 5 hex digits of the sha256. Two different cases with the same prefix replaced each other without any message. Withconfigs/regular configs/weekly configs/experimentstogether, 1679 distinct cases went in and 1678 came out:ExtraTreesClassifier/mnistfromregular/ensemble.jsonand a raftNearestNeighbors/fashion_mnistcase fromexperiments/nearest_neighbors.jsonboth hash toa9f34, and the ExtraTrees case was dropped.This change passes
hash_limit=None(full digest) inremove_duplicated_bench_casesand inbench_case_filter, and makeshash_limitan optional int in the signature. The short hash is still used for the environment name and the vtune result path, where it is only part of a name.How I found it
Reading the config expansion code, I saw the dedup key was the same shortened hash used in display names. I expanded the shipped configs with a small script (dataset loading stubbed) and compared the number of cases after dedup with a count by full sha256 of the same JSON repr. Before: 1679 → 1678, one colliding prefix. After: 1679 → 1679. Each config directory alone, and regular+weekly together, has no collision, so a normal single-directory run is not affected today.
Where this can show up in practice
This is my estimate; I have not seen a field report.
Testing
python -m sklbench -c configs/sklearn_example.jsongoes through all 22 cases locally (macOS arm64). The 11 sklearn cases run; the 11 sklearnex ones fail only because sklearnex is not installable there. (py-cpuinfo returns noflagskey on Apple silicon, so I stubbed that key for this run; unrelated to this change.).pre-commit-config.yaml) are clean.Checklist:
Completeness and readability
Testing