Skip to content

Commit 5288b89

Browse files
committed
[fix] errors on python compatibility
- f-string doesn't allow back-slash before python 3.11 - cyclic import before python 3.13
1 parent 786dc46 commit 5288b89

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/mppq_unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: [ubuntu-latest]
1414
strategy:
1515
matrix:
16-
python-version: ["3.12"]
16+
python-version: ["3.11", "3.12"]
1717
steps:
1818
- uses: actions/checkout@v4
1919
- name: Set up Python ${{ matrix.python-version }}

mppq/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Minimized PPQ quantizer package.
88
"""
99

10-
from mppq import api
10+
from . import api
1111

1212
__all__ = ["api"]
13-
__version__ = "0.7.3"
13+
__version__ = "0.7.4"

mppq/frontend/onnx/onnx_parser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,9 @@ def build(
208208
) -> BaseGraph:
209209
"""Build PPQ IR graph from an onnx file."""
210210
if kw:
211+
keys = "\n ".join(kw.keys())
211212
self._log.warning("Extra argument is not accepted! Ignoring:")
212-
self._log.warning(f'\n {"\n ".join(kw.keys())}')
213+
self._log.warning(f"\n {keys}")
213214
if isinstance(model_object, onnx.ModelProto):
214215
model_pb = model_object
215216
elif not Path(model_object).exists():

0 commit comments

Comments
 (0)