Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit e2679b5

Browse files
authored
move remaining torch pruning modifiers to /sparsification/pruning (#571)
* refactor movement and layer pruning modifiers + delete optim/modifier_pruning * refactor note * quality * review fixes * remove buggy test - to be fixed post release
1 parent 9f05de5 commit e2679b5

File tree

12 files changed

+796
-1577
lines changed

12 files changed

+796
-1577
lines changed

src/sparseml/pytorch/optim/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
from .modifier_epoch import *
3434
from .modifier_lr import *
3535
from .modifier_params import *
36-
from .modifier_pruning import *
3736
from .modifier_regularizer import *
3837
from .optimizer import *
3938
from .sensitivity_as import *

src/sparseml/pytorch/optim/mask_creator_pruning.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
"""
1616
Classes for defining sparsity masks based on model parameters.
17+
18+
NOTE: this file is in the process of being phased out in favor of the
19+
sparsification package. Once all references to mask utils in the optim
20+
package are migrated, this file will be deleted
1721
"""
1822

1923
import random

src/sparseml/pytorch/optim/mask_pruning.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
"""
1616
Code related to applying a mask onto a parameter to impose kernel sparsity,
1717
aka model pruning
18+
19+
NOTE: this file is in the process of being phased out in favor of the
20+
sparsification package. Once all references to mask utils in the optim
21+
package are migrated, this file will be deleted
1822
"""
1923

2024
from functools import partial

src/sparseml/pytorch/optim/mask_pruning_scorer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
"""
1616
Classes for tracking and scoring model parameters to generate pruning scores
17+
18+
NOTE: this file is in the process of being phased out in favor of the
19+
sparsification package. Once all references to mask utils in the optim
20+
package are migrated, this file will be deleted
1721
"""
1822

1923

0 commit comments

Comments
 (0)