Skip to content

Commit 0c9fad1

Browse files
hwangjefffacebook-github-bot
authored andcommitted
Import torchaudio #1755 e11d27c
Summary: Import torchaudio #1755 e11d27c Reviewed By: carolineechen Differential Revision: D30844075 fbshipit-source-id: 1295cc142dda23cb4b029b332b4ef78bb0a67432
1 parent 9cc4b27 commit 0c9fad1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1341
-811
lines changed

.circleci/config.yml

Lines changed: 390 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.circleci/config.yml.in

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ commands:
6060
name: Install CUDA
6161
command: |
6262
packaging/windows/internal/cuda_install.bat
63-
# cudatoolkit >= 11 isn't available for windows in the nvidia channel
64-
if [[ "${CU_VERSION}" =~ cu11.* ]]; then
65-
export CONDA_CHANNEL_FLAGS="-c conda-forge"
66-
fi
6763

6864
binary_common: &binary_common
6965
parameters:
@@ -262,11 +258,16 @@ jobs:
262258
- windows_install_cuda
263259
- run:
264260
name: Build conda packages
261+
no_output_timeout: 20m
265262
command: |
266263
set -ex
267264
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
268265
conda activate base
269266
conda install -yq conda-build "conda-package-handling!=1.5.0"
267+
# cudatoolkit >= 11 isn't available for windows in the nvidia channel
268+
if [[ "${CU_VERSION}" =~ cu11.* ]]; then
269+
export CONDA_CHANNEL_FLAGS="-c conda-forge"
270+
fi
270271
bash packaging/build_conda.sh
271272
- store_artifacts:
272273
path: C:/tools/miniconda3/conda-bld/win-64
@@ -292,6 +293,10 @@ jobs:
292293

293294
# Requires org-member context
294295
binary_wheel_upload:
296+
parameters:
297+
subfolder:
298+
description: "What whl subfolder to upload to, e.g., blank or cu100/ (trailing slash is important)"
299+
type: string
295300
docker:
296301
- image: circleci/python:3.8
297302
steps:
@@ -309,7 +314,7 @@ jobs:
309314
export AWS_SECRET_ACCESS_KEY="${PYTORCH_BINARY_AWS_SECRET_ACCESS_KEY}"
310315
set -x
311316
for pkg in ~/workspace/*.whl; do
312-
aws s3 cp "$pkg" "s3://pytorch/whl/${UPLOAD_CHANNEL}/" --acl public-read
317+
aws s3 cp "$pkg" "s3://pytorch/whl/${UPLOAD_CHANNEL}/<< parameters.subfolder >>" --acl public-read
313318
done
314319

315320
smoke_test_linux_conda:

.circleci/regenerate.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222

2323
PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
24-
CU_VERSIONS_DICT = {"linux": ["cpu", "cu102", "cu111","rocm4.1"],
24+
CU_VERSIONS_DICT = {"linux": ["cpu", "cu102", "cu111","cu113", "rocm4.1"],
2525
"windows": ["cpu", "cu102", "cu111"],
2626
"macos": ["cpu"]}
2727

@@ -75,7 +75,7 @@ def build_workflow_pair(btype, os_type, python_version, cu_version, filter_branc
7575

7676
if upload:
7777

78-
w.append(generate_upload_workflow(base_workflow_name, filter_branch, btype))
78+
w.append(generate_upload_workflow(base_workflow_name, filter_branch, os_type, btype, cu_version))
7979

8080
if filter_branch == 'nightly' and os_type != 'macos':
8181
pydistro = 'pip' if btype == 'wheel' else 'conda'
@@ -157,13 +157,17 @@ def gen_filter_branch_tree(*branches):
157157
}
158158

159159

160-
def generate_upload_workflow(base_workflow_name, filter_branch, btype):
160+
def generate_upload_workflow(base_workflow_name, filter_branch, os_type, btype, cu_version):
161161
d = {
162162
"name": "{base_workflow_name}_upload".format(base_workflow_name=base_workflow_name),
163163
"context": "org-member",
164164
"requires": [base_workflow_name],
165165
}
166166

167+
if btype == 'wheel':
168+
d["subfolder"] = "" if os_type == 'macos' else cu_version + "/"
169+
170+
167171
if filter_branch:
168172
d["filters"] = gen_filter_branch_tree(filter_branch)
169173

.circleci/unittest/linux/scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@ fi
6868
# Install fairseq
6969
git clone https://github.com/pytorch/fairseq
7070
cd fairseq
71-
git checkout e6eddd80
71+
git checkout e47a4c8
7272
pip install .

.circleci/unittest/windows/scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ fi
4949
# Install fairseq
5050
git clone https://github.com/pytorch/fairseq
5151
cd fairseq
52-
git checkout e6eddd80
52+
git checkout e47a4c8
5353
pip install .

docs/source/functional.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,14 @@ rnnt_loss
267267

268268
.. autofunction:: rnnt_loss
269269

270+
:hidden:`Metric`
271+
~~~~~~~~~~~~~~~~
272+
273+
edit_distance
274+
-------------
275+
276+
.. autofunction:: edit_distance
277+
270278
References
271279
~~~~~~~~~~
272280

examples/pipeline_tacotron2/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
This is an example pipeline for text-to-speech using Tacotron2.
22

3+
Here is a [colab example](https://colab.research.google.com/drive/1MPcn1_G5lKozxZ7v8b9yucOD5X5cLK4j?usp=sharing)
4+
that shows how the text-to-speech pipeline is used during inference with the built-in pretrained models.
35

46
## Install required packages
57

examples/pipeline_tacotron2/datasets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def text_mel_collate_fn(batch: Tuple[Tensor, Tensor],
131131
Args:
132132
batch (tuple of two tensors): the first tensor is the mel spectrogram with shape
133133
(n_batch, n_mels, n_frames), the second tensor is the text with shape (n_batch, ).
134-
n_frames_per_step (int): The number of frames to advance every step.
134+
n_frames_per_step (int, optional): The number of frames to advance every step.
135135
136136
Returns:
137137
text_padded (Tensor): The input text to Tacotron2 with shape (n_batch, max of ``text_lengths``).

examples/pipeline_tacotron2/text/text_preprocessing.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ def text_to_sequence(sent: str,
123123
symbol_list (str or List of string, optional): When the input is a string, available options include
124124
"english_characters" and "english_phonemes". When the input is a list of string, ``symbol_list`` will
125125
directly be used as the symbol to encode. (Default: "english_characters")
126-
phonemizer (str, optional): The phonemizer to use. Only used when ``symbol_list`` is "english_phonemes".
126+
phonemizer (str or None, optional): The phonemizer to use. Only used when ``symbol_list`` is "english_phonemes".
127127
Available options include "DeepPhonemizer". (Default: "DeepPhonemizer")
128-
checkpoint (str, optional): The path to the checkpoint of the phonemizer. Only used when ``symbol_list`` is
129-
"english_phonemes". (Default: "./en_us_cmudict_forward.pt")
130-
cmudict_root (str, optional): The path to the directory where the CMUDict dataset is found or downloaded.
131-
Only used when ``symbol_list`` is "english_phonemes". (Default: "./")
128+
checkpoint (str or None, optional): The path to the checkpoint of the phonemizer. Only used when
129+
``symbol_list`` is "english_phonemes". (Default: "./en_us_cmudict_forward.pt")
130+
cmudict_root (str or None, optional): The path to the directory where the CMUDict dataset is found or
131+
downloaded. Only used when ``symbol_list`` is "english_phonemes". (Default: "./")
132132
133133
Returns:
134134
List of integers corresponding to the symbols in the sentence.

examples/pipeline_wavernn/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ def main(args):
272272
n_mels=args.n_freq,
273273
f_min=args.f_min,
274274
mel_scale='slaney',
275+
norm='slaney',
275276
**melkwargs,
276277
),
277278
NormalizeDB(min_level_db=args.min_level_db, normalization=args.normalization),

0 commit comments

Comments
 (0)