|
38 | 38 |
|
39 | 39 | def match_named_modules(
|
40 | 40 | model: torch.nn.Module,
|
41 |
| - targets: Optional[Iterable[str]] = None, |
| 41 | + targets: Optional[Iterable[str]], |
42 | 42 | ignore: Optional[Iterable[str]] = None,
|
43 | 43 | fused: Optional[FusedMappping] = None,
|
44 | 44 | warn_on_fail: bool = False,
|
@@ -77,7 +77,7 @@ def match_named_modules(
|
77 | 77 |
|
78 | 78 | def match_named_parameters(
|
79 | 79 | model: torch.nn.Module,
|
80 |
| - targets: Optional[Iterable[str]] = None, |
| 80 | + targets: Optional[Iterable[str]], |
81 | 81 | ignore: Optional[Iterable[str]] = None,
|
82 | 82 | fused: Optional[FusedMappping] = None,
|
83 | 83 | warn_on_fail: bool = False,
|
@@ -119,7 +119,7 @@ def match_named_parameters(
|
119 | 119 |
|
120 | 120 |
|
121 | 121 | 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]] |
123 | 123 | ) -> List[str]:
|
124 | 124 | """
|
125 | 125 | Returns the targets that match the given name and module.
|
@@ -158,7 +158,7 @@ def match_targets(
|
158 | 158 |
|
159 | 159 | def match_modules_set(
|
160 | 160 | model: torch.nn.Module,
|
161 |
| - targets: Optional[Iterable[str]] = None, |
| 161 | + targets: Optional[Iterable[str]], |
162 | 162 | ignore: Optional[Iterable[str]] = None,
|
163 | 163 | ) -> Generator[Iterable[torch.nn.Module]]:
|
164 | 164 | """
|
|
0 commit comments