Skip to content

Commit c9b8ba2

Browse files
committed
Remove default None target value in match utils
1 parent 4c21a8f commit c9b8ba2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compressed_tensors/utils/match.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
def match_named_modules(
4040
model: torch.nn.Module,
41-
targets: Optional[Iterable[str]] = None,
41+
targets: Optional[Iterable[str]],
4242
ignore: Optional[Iterable[str]] = None,
4343
fused: Optional[FusedMappping] = None,
4444
warn_on_fail: bool = False,
@@ -77,7 +77,7 @@ def match_named_modules(
7777

7878
def match_named_parameters(
7979
model: torch.nn.Module,
80-
targets: Optional[Iterable[str]] = None,
80+
targets: Optional[Iterable[str]],
8181
ignore: Optional[Iterable[str]] = None,
8282
fused: Optional[FusedMappping] = None,
8383
warn_on_fail: bool = False,
@@ -119,7 +119,7 @@ def match_named_parameters(
119119

120120

121121
def match_targets(
122-
name: str, module: torch.nn.Module, targets: Iterable[str] | None = None
122+
name: str, module: torch.nn.Module, targets: Optional[Iterable[str]]
123123
) -> List[str]:
124124
"""
125125
Returns the targets that match the given name and module.
@@ -158,7 +158,7 @@ def match_targets(
158158

159159
def match_modules_set(
160160
model: torch.nn.Module,
161-
targets: Optional[Iterable[str]] = None,
161+
targets: Optional[Iterable[str]],
162162
ignore: Optional[Iterable[str]] = None,
163163
) -> Generator[Iterable[torch.nn.Module]]:
164164
"""

0 commit comments

Comments
 (0)