Skip to content

Commit a9694a5

Browse files
authored
Fix SyntaxWarning during installation / import (#3184)
Summary: Fixes a regex related syntax warning reported by Daniel / unsloth Test Plan: Only verified during installation but should apply for loading as well ``` Before:
Extracting torchao-0.15.0+git30082cb3d-py3.12.egg to …/lib/python3.12/site-packages /data/users/jerryzh/miniconda3/envs/hmbd/lib/python3.12/site-packages/torchao-0.15.0+git30082cb3d-py3.12.egg/torchao/quantization/quant_api.py:2333: SyntaxWarning: invalid escape sequence '\.' * regex for module names, must start with `re:`, e.g. `re:language\.layers\..+\.q_proj`, Adding torchao 0.15.0+git30082cb3d to easy-install.pth file 

After:
creating …python3.12/site-packages/torchao-0.15.0+git30082cb3d-py3.12.egg Extracting torchao-0.15.0+git30082cb3d-py3.12.egg to …lib/python3.12/site-packages Adding torchao 0.15.0+git30082cb3d to easy-install.pth file Installed …/torchao-0.15.0+git30082cb3d-py3.12.egg Processing dependencies for torchao==0.15.0+git30082cb3d Finished processing dependencies for torchao==0.15.0+git30082cb3d ``` Reviewers: Subscribers: Tasks: Tags:
1 parent 30082cb commit a9694a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchao/quantization/quant_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2317,7 +2317,7 @@ def _fpx_weight_only_transform(
23172317

23182318
@dataclass
23192319
class ModuleFqnToConfig(AOBaseConfig):
2320-
"""Per module configurations for torchao quantize_ API
2320+
r"""Per module configurations for torchao quantize_ API
23212321
23222322
Args:
23232323
`module_fqn_to_config`: typing.OrderedDict[str, Optional[AOBaseConfig]]: an

0 commit comments

Comments
 (0)