Skip to content

Commit c4d27b5

Browse files
author
Svetlana Karslioglu
authored
Merge branch 'main' into redirect-tts
2 parents 06ae7cd + e1d645e commit c4d27b5

Some content is hidden

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

49 files changed

+1227
-474
lines changed

.circleci/config.yml

Lines changed: 128 additions & 78 deletions
Large diffs are not rendered by default.

.circleci/config.yml.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ pytorch_tutorial_build_defaults: &pytorch_tutorial_build_defaults
118118
echo "declare -x COMMIT_SOURCE=${CIRCLE_BRANCH}" >> /home/circleci/project/env
119119
# DANGER! DO NOT REMOVE THE `set +x` SETTING HERE!
120120
set +x
121-
if [[ "$CIRCLE_BRANCH" == master ]]; then
121+
if [[ "$CIRCLE_BRANCH" == master || "$CIRCLE_BRANCH" == main ]]; then
122122
if [ -z "${CIRCLECI_AWS_ACCESS_KEY_FOR_PYTORCH_TUTORIAL_BUILD_MASTER_S3_BUCKET}" ]; then exit 1; fi
123123
if [ -z "${CIRCLECI_AWS_SECRET_KEY_FOR_PYTORCH_TUTORIAL_BUILD_MASTER_S3_BUCKET}" ]; then exit 1; fi
124124
if [ -z "${GITHUB_PYTORCHBOT_USERNAME}" ]; then exit 1; fi
@@ -142,14 +142,14 @@ pytorch_tutorial_build_defaults: &pytorch_tutorial_build_defaults
142142

143143
pytorch_tutorial_build_worker_defaults: &pytorch_tutorial_build_worker_defaults
144144
environment:
145-
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-cuda11.6-cudnn8-py3-gcc7"
145+
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-cuda11.7-cudnn8-py3-gcc7"
146146
CUDA_VERSION: "9"
147147
resource_class: gpu.nvidia.small
148148
<<: *pytorch_tutorial_build_defaults
149149

150150
pytorch_tutorial_build_manager_defaults: &pytorch_tutorial_build_manager_defaults
151151
environment:
152-
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-cuda11.6-cudnn8-py3-gcc7"
152+
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-cuda11.7-cudnn8-py3-gcc7"
153153
resource_class: medium
154154
<<: *pytorch_tutorial_build_defaults
155155
{% raw %}
@@ -185,7 +185,7 @@ pytorch_windows_build_worker: &pytorch_windows_build_worker
185185
jobs:
186186
{{ jobs("pr") }}
187187

188-
{{ jobs("master") }}
188+
{{ jobs("trunk") }}
189189

190190
{{ windows_jobs() }}
191191

@@ -194,6 +194,6 @@ workflows:
194194
jobs:
195195
# Build jobs that only run on PR
196196
{{ workflows_jobs("pr") }}
197-
# Build jobs that only run on master
198-
{{ workflows_jobs("master") }}
197+
# Build jobs that only run on trunk
198+
{{ workflows_jobs("trunk") }}
199199
# {{ windows_workflows_jobs() }}

.circleci/regenerate.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
import yaml
1010
from jinja2 import select_autoescape
1111

12-
WORKFLOWS_JOBS_PR = {"filters": {"branches": {"ignore": ["master"]}}}
12+
WORKFLOWS_JOBS_PR = {"filters": {"branches": {"ignore": ["master", "main"]}}}
1313

14-
WORKFLOWS_JOBS_MASTER = {
14+
WORKFLOWS_JOBS_TRUNK = {
1515
"context": "org-member",
16-
"filters": {"branches": {"only": ["master"]}},
16+
"filters": {"branches": {"only": ["master", "main"]}},
1717
}
1818

1919

@@ -23,39 +23,39 @@ def indent(indentation, data_list):
2323
)
2424

2525

26-
def jobs(pr_or_master, num_workers=20, indentation=2):
26+
def jobs(pr_or_trunk, num_workers=20, indentation=2):
2727
jobs = {}
2828

2929
# all tutorials that need gpu.nvidia.small.multi machines will be routed
3030
# by get_files_to_run.py to 0th worker
3131
needs_gpu_nvidia_small_multi = [0]
32-
jobs[f"pytorch_tutorial_{pr_or_master}_build_manager"] = {
32+
jobs[f"pytorch_tutorial_{pr_or_trunk}_build_manager"] = {
3333
"<<": "*pytorch_tutorial_build_manager_defaults"
3434
}
3535
for i in range(num_workers):
3636
job_info = {"<<": "*pytorch_tutorial_build_worker_defaults"}
3737
if i in needs_gpu_nvidia_small_multi:
3838
job_info["resource_class"] = "gpu.nvidia.small.multi"
39-
jobs[f"pytorch_tutorial_{pr_or_master}_build_worker_{i}"] = job_info
39+
jobs[f"pytorch_tutorial_{pr_or_trunk}_build_worker_{i}"] = job_info
4040

4141
return indent(indentation, jobs).replace("'", "")
4242

4343

44-
def workflows_jobs(pr_or_master, indentation=6, num_workers=20):
44+
def workflows_jobs(pr_or_trunk, indentation=6, num_workers=20):
4545
jobs = []
4646
job_info = deepcopy(
47-
WORKFLOWS_JOBS_PR if pr_or_master == "pr" else WORKFLOWS_JOBS_MASTER
47+
WORKFLOWS_JOBS_PR if pr_or_trunk == "pr" else WORKFLOWS_JOBS_TRUNK
4848
)
4949

5050
for i in range(num_workers):
5151
jobs.append(
52-
{f"pytorch_tutorial_{pr_or_master}_build_worker_{i}": deepcopy(job_info)}
52+
{f"pytorch_tutorial_{pr_or_trunk}_build_worker_{i}": deepcopy(job_info)}
5353
)
5454

5555
job_info["requires"] = [
56-
f"pytorch_tutorial_{pr_or_master}_build_worker_{i}" for i in range(num_workers)
56+
f"pytorch_tutorial_{pr_or_trunk}_build_worker_{i}" for i in range(num_workers)
5757
]
58-
jobs.append({f"pytorch_tutorial_{pr_or_master}_build_manager": deepcopy(job_info)})
58+
jobs.append({f"pytorch_tutorial_{pr_or_trunk}_build_manager": deepcopy(job_info)})
5959
return indent(indentation, jobs)
6060

6161

@@ -65,7 +65,7 @@ def windows_jobs(indentation=2, num_workers=4):
6565
jobs[f"pytorch_tutorial_windows_pr_build_worker_{i}"] = {
6666
"<<": "*pytorch_windows_build_worker"
6767
}
68-
jobs[f"pytorch_tutorial_windows_master_build_worker_{i}"] = {
68+
jobs[f"pytorch_tutorial_windows_trunk_build_worker_{i}"] = {
6969
"<<": "*pytorch_windows_build_worker"
7070
}
7171
return indent(indentation, jobs).replace("'", "")
@@ -79,10 +79,10 @@ def windows_workflows_jobs(indentation=6, num_workers=4):
7979
{f"pytorch_tutorial_windows_pr_build_worker_{i}": deepcopy(job_info)}
8080
)
8181

82-
job_info = WORKFLOWS_JOBS_MASTER
82+
job_info = WORKFLOWS_JOBS_TRUNK
8383
for i in range(num_workers):
8484
jobs.append(
85-
{f"pytorch_tutorial_windows_master_build_worker_{i}": deepcopy(job_info)}
85+
{f"pytorch_tutorial_windows_trunk_build_worker_{i}": deepcopy(job_info)}
8686
)
8787

8888
return ("\n#").join(indent(indentation, jobs).splitlines())

.jenkins/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set -ex
22

3-
if [[ "$COMMIT_SOURCE" == master ]]; then
3+
if [[ "$COMMIT_SOURCE" == master || "$COMMIT_SOURCE" == main ]]; then
44
export BUCKET_NAME=pytorch-tutorial-build-master
55
else
66
export BUCKET_NAME=pytorch-tutorial-build-pull-request
@@ -153,7 +153,7 @@ elif [[ "${JOB_BASE_NAME}" == *manager ]]; then
153153
awsv2 s3 cp manager.7z s3://${BUCKET_NAME}/${COMMIT_ID}/manager.7z --acl public-read
154154

155155
# Step 7: push new HTML files and static files to gh-pages
156-
if [[ "$COMMIT_SOURCE" == master ]]; then
156+
if [[ "$COMMIT_SOURCE" == master || "$COMMIT_SOURCE" == main ]]; then
157157
git clone https://github.com/pytorch/tutorials.git -b gh-pages gh-pages
158158
cp -r docs/* gh-pages/
159159
pushd gh-pages

.jenkins/get_docker_tag.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
}
66

77
if __name__ == "__main__":
8-
url = "https://api.github.com/repos/pytorch/pytorch/contents/.circleci"
8+
url = "https://api.github.com/repos/pytorch/pytorch/contents/.ci"
99

1010
response = requests.get(url, headers=REQUEST_HEADERS)
11-
for file in response.json():
12-
if file["name"] == "docker":
13-
print(file["sha"])
11+
docker_sha = None
12+
for finfo in response.json():
13+
if finfo["name"] == "docker":
14+
docker_sha = finfo["sha"]
15+
break
16+
if docker_sha is None:
17+
raise RuntimeError("Can't find sha sum of docker folder")
18+
print(docker_sha)

.jenkins/validate_tutorials_built.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@
4949
"recipes/timer_quick_start",
5050
"recipes/amp_recipe",
5151
"recipes/Captum_Recipe",
52-
"hyperparameter_tuning_tutorial",
5352
"flask_rest_api_tutorial",
5453
"text_to_speech_with_torchaudio",
55-
"ax_multiobjective_nas_tutorial"
5654
]
5755

5856

0 commit comments

Comments
 (0)