Skip to content

Commit

Permalink
[CI] fix unit tests (#223)
Browse files Browse the repository at this point in the history
* [CI] fix unit tests
  • Loading branch information
peterjc123 committed May 31, 2023
1 parent 2c7dbbd commit edf2852
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
fi
fi
- name: Install TinyNeuralNetwork
run: python setup.py install
run: pip install .
- name: Install test dependencies
env:
PYTORCH_VER: ${{ matrix.vers.pt_ver }}
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Install PyTorch
run: conda install pytorch torchvision cpuonly -c pytorch
- name: Install TinyNeuralNetwork
run: python setup.py install
run: pip install .
- name: Check op matrix
run: |
python scripts/gen_op_docs.py
Expand Down
4 changes: 3 additions & 1 deletion tinynn/graph/quantization/quantizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@

try:
import ruamel_yaml as yaml
from ruamel_yaml import CommentedMap
except ModuleNotFoundError:
import ruamel.yaml as yaml
from ruamel.yaml import CommentedMap


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

self.train_mode_dict = {}

self.layerwise_config = yaml.comments.CommentedMap()
self.layerwise_config = CommentedMap()
self.effective_layers = []
self.layerwise_default = True
if config is not None and 'layerwise_config' in config:
Expand Down

0 comments on commit edf2852

Please sign in to comment.