Skip to content

Commit 937e3a4

Browse files
jerryzh168andrewor14
authored andcommitted
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 2dedd73 commit 937e3a4

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
@@ -2386,7 +2386,7 @@ def _fpx_weight_only_transform(
23862386

23872387
@dataclass
23882388
class ModuleFqnToConfig(AOBaseConfig):
2389-
"""Per module configurations for torchao quantize_ API
2389+
r"""Per module configurations for torchao quantize_ API
23902390
23912391
Args:
23922392
`module_fqn_to_config`: typing.OrderedDict[str, Optional[AOBaseConfig]]: an

0 commit comments

Comments
 (0)