Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Dec 30, 2024
1 parent 2c7ad4d commit 405e9e8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
17 changes: 15 additions & 2 deletions .github/scripts/docker/generate_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
import json


def get_args():
parser = argparse.ArgumentParser()
parser.add_argument(
"--min-torch-version",
help="Minimu torch version",
)
return parser.parse_args()


def version_gt(a, b):
a_major, a_minor = list(map(int, a.split(".")))[:2]
b_major, b_minor = list(map(int, b.split(".")))[:2]
Expand Down Expand Up @@ -42,7 +51,7 @@ def get_torchaudio_version(torch_version):
return torch_version


def get_matrix():
def get_matrix(min_torch_version):
k2_version = "1.24.4.dev20241029"
kaldifeat_version = "1.25.5.dev20241029"
version = "20241218"
Expand All @@ -64,6 +73,9 @@ def get_matrix():
matrix = []
for p in python_version:
for t in torch_version:
if min_torch_version and version_gt(min_torch_version, t):
continue

# torchaudio <= 1.13.x supports only python <= 3.10

if version_gt(p, "3.10") and not version_gt(t, "2.0"):
Expand Down Expand Up @@ -101,7 +113,8 @@ def get_matrix():


def main():
matrix = get_matrix()
args = get_args()
matrix = get_matrix(min_torch_version=args.min_torch_version)
print(json.dumps({"include": matrix}))


Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/baker_zh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
id: set-matrix
run: |
# outputting for debugging purposes
python ./.github/scripts/docker/generate_build_matrix.py
MATRIX=$(python ./.github/scripts/docker/generate_build_matrix.py)
python ./.github/scripts/docker/generate_build_matrix.py --min-torch-version "2.3"
MATRIX=$(python ./.github/scripts/docker/generate_build_matrix.py --min-torch-version "2.3")
echo "::set-output name=matrix::${MATRIX}"
baker_zh:
Expand Down
9 changes: 9 additions & 0 deletions egs/baker_zh/TTS/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ The above command generate the following files:

where the 2 in `model-steps-2.onnx` means it uses 2 steps for the ODE solver.

**HINT**: If you get the following error while running `export_onnx.py`:

```
torch.onnx.errors.UnsupportedOperatorError: Exporting the operator
'aten::scaled_dot_product_attention' to ONNX opset version 14 is not supported.
```

please use `torch>=2.2.0`.

To export the Hifigan vocoder to onnx, please use:

```bash
Expand Down

0 comments on commit 405e9e8

Please sign in to comment.