Skip to content

Commit

Permalink
Merge pull request #4576 from espnet/kamo-naoyuki-patch-1
Browse files Browse the repository at this point in the history
Unfix matplotlib version
  • Loading branch information
kamo-naoyuki committed Aug 18, 2022
2 parents c83abd7 + 8379cc3 commit 8331902
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-${{ hashFiles('**/setup.py') }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/Makefile') }}
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/test_import.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ jobs:
pytorch-version: [1.11.0]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-${{ hashFiles('**/setup.py') }}
- name: Set up Python
uses: actions/setup-python@v1
with:
Expand All @@ -35,10 +31,14 @@ jobs:
env:
TH_VERSION: ${{ matrix.pytorch-version }}
run: |
python3 -m pip install "numpy<=1.21.4"
python3 -m pip freeze
./tools/installers/install_torch.sh false ${TH_VERSION} CPU
./tools/installers/install_chainer.sh CPU
python3 setup.py bdist_wheel
python3 -m pip install dist/espnet-*.whl
# log
python3 -m pip freeze
- name: Import all modules (Try1)
run: |
python3 ./ci/test_import_all.py
Expand All @@ -47,6 +47,8 @@ jobs:
TH_VERSION: ${{ matrix.pytorch-version }}
run: |
python3 -m pip install "$(ls dist/espnet-*.whl)[all]"
# log
python3 -m pip freeze
- name: Import all modules (Try2)
run: |
python3 ./ci/test_import_all.py
8 changes: 4 additions & 4 deletions espnet/nets/pytorch_backend/transformer/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ def _plot_and_save_attention(att_w, filename, xtokens=None, ytokens=None):
ax.yaxis.set_major_locator(MaxNLocator(integer=True))
# Labels for major ticks
if xtokens is not None:
ax.set_xticks(numpy.linspace(0, len(xtokens) - 1, len(xtokens)))
ax.set_xticks(numpy.linspace(0, len(xtokens) - 1, 1), minor=True)
ax.set_xticks(numpy.linspace(0, len(xtokens), len(xtokens) + 1))
ax.set_xticks(numpy.linspace(0, len(xtokens), 1), minor=True)
ax.set_xticklabels(xtokens + [""], rotation=40)
if ytokens is not None:
ax.set_yticks(numpy.linspace(0, len(ytokens) - 1, len(ytokens)))
ax.set_yticks(numpy.linspace(0, len(ytokens) - 1, 1), minor=True)
ax.set_yticks(numpy.linspace(0, len(ytokens), len(ytokens) + 1))
ax.set_yticks(numpy.linspace(0, len(ytokens), 1), minor=True)
ax.set_yticklabels(ytokens + [""])
fig.tight_layout()
return fig
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"torch>=1.3.0",
"torch_complex",
"nltk>=3.4.5",
"numpy<=1.21.4",
# https://github.com/espnet/espnet/runs/6646737793?check_suite_focus=true#step:8:7651
"protobuf<=3.20.1",
# ASR
Expand All @@ -40,7 +41,7 @@
],
# train: The modules invoked when training only.
"train": [
"matplotlib==3.1.0",
"matplotlib",
"pillow>=6.1.0",
"editdistance==0.5.2",
"wandb",
Expand Down Expand Up @@ -75,7 +76,6 @@
"gtn==0.0.0",
],
"setup": [
"numpy<=1.21.4",
"pytest-runner",
],
"test": [
Expand Down

0 comments on commit 8331902

Please sign in to comment.