Skip to content

Commit a2bfc03

Browse files
authored
fix match.py syntax (#426)
* fix match.py syntax Signed-off-by: shanjiaz <[email protected]> * tuple Signed-off-by: shanjiaz <[email protected]> --------- Signed-off-by: shanjiaz <[email protected]>
1 parent 8a93d26 commit a2bfc03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/compressed_tensors/utils/match.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import logging
1616
import re
1717
from collections.abc import Generator
18-
from typing import Iterable, List, Mapping, Optional, Tuple
18+
from typing import Iterable, List, Mapping, Optional, Tuple, Union
1919

2020
import torch
2121
from compressed_tensors.utils.internal import InternalModule
@@ -174,8 +174,8 @@ def match_modules_set(
174174
def is_match(
175175
name: str,
176176
module: torch.nn.Module,
177-
targets: str | Iterable[str],
178-
ignore: str | Iterable[str] = tuple(),
177+
targets: Union[str, Iterable[str]],
178+
ignore: Union[str, Iterable[str]] = tuple(),
179179
fused: Optional[FusedMappping] = None,
180180
) -> bool:
181181
"""

0 commit comments

Comments
 (0)