Add bulk-mode detection and removal to remove_traps (explicit and random bulk vectors)#361
Open
charlesmartin14 wants to merge 1 commit intomasterfrom
Open
Add bulk-mode detection and removal to remove_traps (explicit and random bulk vectors)#361charlesmartin14 wants to merge 1 commit intomasterfrom
charlesmartin14 wants to merge 1 commit intomasterfrom
Conversation
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.
Motivation
Description
identify_bulk_mode_indicesto classify bulk modes (<= TW threshold) in a layer using the same MP/TW logic as traps.collect_bulk_artifactsto extract bulk-mode artifacts via the existing permute + MP/TW analysis pipeline.apply_remove_trapsandremove_trapsto accept new parametersbulk_indicesandnum_random_bulk_vectors, to validate indices, and to support removing both traps and bulk vectors by replacing their rank-1 contributions withmake_stat_matched_random_matrixdraws.WeightWatcherwrappers (apply_remove_trapsandremove_traps) to expose the newbulk_indicesandnum_random_bulk_vectorsarguments and update docstrings accordingly.Testing
tests/test_remove_traps.py::test_remove_traps_can_remove_explicit_bulk_vectorandtests/test_remove_traps.py::test_remove_traps_can_remove_random_bulk_vector, and the existingtest_remove_traps_invalid_indices_warns_and_skips, and they all passed underpytest.Codex Task