Skip to content

Commit edf2852

Browse files
authored
[CI] fix unit tests (#223)
* [CI] fix unit tests
1 parent 2c7dbbd commit edf2852

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/unit-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
fi
5454
fi
5555
- name: Install TinyNeuralNetwork
56-
run: python setup.py install
56+
run: pip install .
5757
- name: Install test dependencies
5858
env:
5959
PYTORCH_VER: ${{ matrix.vers.pt_ver }}
@@ -105,7 +105,7 @@ jobs:
105105
- name: Install PyTorch
106106
run: conda install pytorch torchvision cpuonly -c pytorch
107107
- name: Install TinyNeuralNetwork
108-
run: python setup.py install
108+
run: pip install .
109109
- name: Check op matrix
110110
run: |
111111
python scripts/gen_op_docs.py

tinynn/graph/quantization/quantizer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@
6060

6161
try:
6262
import ruamel_yaml as yaml
63+
from ruamel_yaml import CommentedMap
6364
except ModuleNotFoundError:
6465
import ruamel.yaml as yaml
66+
from ruamel.yaml import CommentedMap
6567

6668

6769
# Fusable OPs for Quantize Aware Training
@@ -363,7 +365,7 @@ def __init__(self, model, dummy_input, work_dir: typing.Optional[str] = None, co
363365

364366
self.train_mode_dict = {}
365367

366-
self.layerwise_config = yaml.comments.CommentedMap()
368+
self.layerwise_config = CommentedMap()
367369
self.effective_layers = []
368370
self.layerwise_default = True
369371
if config is not None and 'layerwise_config' in config:

0 commit comments

Comments
 (0)