Skip to content

Commit 3f0ea35

Browse files
committed
Update on "std/var: Deprecate overloads with "unbiased" argument"
[ghstack-poisoned]
2 parents 5e1822e + 8553f6e commit 3f0ea35

67 files changed

Lines changed: 1438 additions & 562 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/bash
2+
# =================== The following code **should** be executed inside Docker container ===================
3+
4+
# Install dependencies
5+
sudo apt-get -y update
6+
sudo apt-get -y install expect-dev
7+
8+
# This is where the local pytorch install in the docker image is located
9+
pt_checkout="/var/lib/jenkins/workspace"
10+
source "$pt_checkout/.jenkins/pytorch/common_utils.sh"
11+
echo "functorch_doc_push_script.sh: Invoked with $*"
12+
13+
set -ex
14+
15+
version=${DOCS_VERSION:-nightly}
16+
echo "version: $version"
17+
18+
# Build functorch docs
19+
pushd $pt_checkout/functorch/docs
20+
pip -q install -r requirements.txt
21+
make html
22+
popd
23+
24+
git clone https://github.com/pytorch/functorch -b gh-pages --depth 1 functorch_ghpages
25+
pushd functorch_ghpages
26+
27+
if [ $version == "master" ]; then
28+
version=nightly
29+
fi
30+
31+
git rm -rf "$version" || true
32+
mv "$pt_checkout/functorch/docs/build/html" "$version"
33+
34+
git add "$version" || true
35+
git status
36+
git config user.email "soumith+bot@pytorch.org"
37+
git config user.name "pytorchbot"
38+
# If there aren't changes, don't make a commit; push is no-op
39+
git commit -m "Generate Python docs from pytorch/pytorch@${GITHUB_SHA}" || true
40+
git status
41+
42+
if [[ "${WITH_PUSH:-}" == true ]]; then
43+
git push -u origin gh-pages
44+
fi
45+
46+
popd
47+
# =================== The above code **should** be executed inside Docker container ===================

.github/ci_commit_pins/xla.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
96c96ce89d2731846b733054f3cef8915f31a609
1+
f2b36df6a1a80137eff7644e6d0f4eeb7ff429d6

.github/merge_rules.yaml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
- BowenBao
2323
- abock
2424
mandatory_checks_name:
25-
- Facebook CLA Check
25+
- EasyCLA
2626
- Lint
2727
- pull
2828

@@ -38,7 +38,7 @@
3838
- jjsjann123
3939
- ptrblck
4040
mandatory_checks_name:
41-
- Facebook CLA Check
41+
- EasyCLA
4242
- Lint
4343
- pull
4444

@@ -54,7 +54,7 @@
5454
- dagitses
5555
- pytorch/pytorch-dev-infra
5656
mandatory_checks_name:
57-
- Facebook CLA Check
57+
- EasyCLA
5858
- Lint
5959
- pull
6060

@@ -65,7 +65,7 @@
6565
approved_by:
6666
- pytorchbot
6767
mandatory_checks_name:
68-
- Facebook CLA Check
68+
- EasyCLA
6969
- Lint
7070
- pull
7171

@@ -75,7 +75,7 @@
7575
approved_by:
7676
- pytorchbot
7777
mandatory_checks_name:
78-
- Facebook CLA Check
78+
- EasyCLA
7979
- Lint
8080
- pull / linux-bionic-py3_7-clang8-xla / build
8181
- pull / linux-bionic-py3_7-clang8-xla / test (xla, 1, 1, linux.2xlarge)
@@ -87,7 +87,7 @@
8787
approved_by:
8888
- svekars
8989
mandatory_checks_name:
90-
- Facebook CLA Check
90+
- EasyCLA
9191
- Lint
9292
- pull
9393

@@ -102,7 +102,7 @@
102102
- dreiss
103103
- raziel
104104
mandatory_checks_name:
105-
- Facebook CLA Check
105+
- EasyCLA
106106
- Lint
107107
- pull
108108

@@ -123,7 +123,7 @@
123123
- lezcano
124124
- IvanYashchuk
125125
mandatory_checks_name:
126-
- Facebook CLA Check
126+
- EasyCLA
127127
- Lint
128128
- pull
129129

@@ -143,7 +143,7 @@
143143
- mruberry
144144
- peterbell10
145145
mandatory_checks_name:
146-
- Facebook CLA Check
146+
- EasyCLA
147147
- Lint
148148
- pull
149149

@@ -170,7 +170,7 @@
170170
- pearu
171171
- IvanYashchuk
172172
mandatory_checks_name:
173-
- Facebook CLA Check
173+
- EasyCLA
174174
- Lint
175175
- pull
176176

@@ -186,7 +186,7 @@
186186
- malfet
187187
- razarmehr
188188
mandatory_checks_name:
189-
- Facebook CLA Check
189+
- EasyCLA
190190
- Lint
191191
- pull
192192
- name: Distributions
@@ -198,7 +198,7 @@
198198
- neerajprad
199199
- alicanb
200200
mandatory_checks_name:
201-
- Facebook CLA Check
201+
- EasyCLA
202202
- Lint
203203
- pull
204204

@@ -232,7 +232,7 @@
232232
- aazzolini
233233
- kwen2501
234234
mandatory_checks_name:
235-
- Facebook CLA Check
235+
- EasyCLA
236236
- Lint
237237
- pull
238238

@@ -245,7 +245,7 @@
245245
- XiaobingSuper
246246
- yanbing-j
247247
mandatory_checks_name:
248-
- Facebook CLA Check
248+
- EasyCLA
249249
- Lint
250250
- pull
251251

@@ -257,7 +257,7 @@
257257
- sanchitintel
258258
- chunyuan-w
259259
mandatory_checks_name:
260-
- Facebook CLA Check
260+
- EasyCLA
261261
- Lint
262262
- pull
263263

@@ -272,7 +272,7 @@
272272
- mingfeima
273273
- XiaobingSuper
274274
mandatory_checks_name:
275-
- Facebook CLA Check
275+
- EasyCLA
276276
- Lint
277277
- pull
278278

@@ -285,7 +285,7 @@
285285
- leslie-fang-intel
286286
- CaoE
287287
mandatory_checks_name:
288-
- Facebook CLA Check
288+
- EasyCLA
289289
- Lint
290290
- pull
291291

@@ -299,7 +299,7 @@
299299
- leslie-fang-intel
300300
- CaoE
301301
mandatory_checks_name:
302-
- Facebook CLA Check
302+
- EasyCLA
303303
- Lint
304304
- pull
305305

@@ -317,7 +317,7 @@
317317
- alanwaketan
318318
- JackCaoG
319319
mandatory_checks_name:
320-
- Facebook CLA Check
320+
- EasyCLA
321321
- Lint
322322
- pull
323323

@@ -327,7 +327,7 @@
327327
approved_by:
328328
- pytorch/metamates
329329
mandatory_checks_name:
330-
- Facebook CLA Check
330+
- EasyCLA
331331
- Lint
332332
- pull
333333

@@ -338,7 +338,7 @@
338338
- mruberry
339339
- lezcano
340340
mandatory_checks_name:
341-
- Facebook CLA Check
341+
- EasyCLA
342342
- Lint
343343
- pull
344344

@@ -351,6 +351,6 @@
351351
- ezyang
352352
- dzhulgakov
353353
mandatory_checks_name:
354-
- Facebook CLA Check
354+
- EasyCLA
355355
- Lint
356356
- pull

.github/scripts/pr-sanity-check.sh

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/usr/bin/env bash
2+
3+
set -eou pipefail
4+
5+
GIT_TOP_DIR=$(git rev-parse --show-toplevel)
6+
7+
TMPFILE=$(mktemp)
8+
trap "rm -rf ${TMPFILE}" EXIT
9+
10+
# By default just run against the latest commit
11+
BASE=${BASE:-HEAD~1}
12+
HEAD=${HEAD:-HEAD}
13+
14+
ancestor=$(git merge-base "${BASE}" "${HEAD}")
15+
echo "INFO: Checking aginst the following stats"
16+
(
17+
set -x
18+
git diff --stat "$ancestor" "${HEAD}" | sed '$d' > "${TMPFILE}"
19+
)
20+
21+
while read -r git_attribute; do
22+
if echo "${git_attribute}" | grep "linguist-generated=true" >/dev/null 2>/dev/null; then
23+
pattern=$(echo ${git_attribute} | cut -d' ' -f1)
24+
escaped_pattern=$(printf '%s\n' "$pattern" | sed -e 's/[\/&]/\\&/g')
25+
# Delete known generated files
26+
sed -i '/'"${escaped_pattern}"'/d' "${TMPFILE}"
27+
fi
28+
done < "${GIT_TOP_DIR}/.gitattributes"
29+
30+
echo "INFO: Showing non-generated files:"
31+
(
32+
set -x
33+
cat "${TMPFILE}"
34+
)
35+
36+
# Get only files that have changed
37+
changed_files=$(cut -d' ' -f2 "${TMPFILE}" | xargs)
38+
39+
details=$(git diff --shortstat "$ancestor" "${HEAD}" -- ${changed_files})
40+
add=$(echo "$details" | grep -o '[0-9]* insertion' | grep -o '[0-9]*' || true)
41+
remove=$(echo "$details" | grep -o '[0-9]* deletion' | grep -o '[0-9]*' || true)
42+
pr_size=0
43+
if [ "$add" ]; then
44+
pr_size=$(("$pr_size" + "$add"))
45+
fi
46+
if [ "$remove" ]; then
47+
pr_size=$(("$pr_size" + "$remove"))
48+
fi
49+
echo "INFO: PR SIZE is ${pr_size}"
50+
51+
if ((pr_size > 2000)); then
52+
echo
53+
echo 'Your PR is '"$pr_size"' LOC which is more than the 2000 maximum'
54+
echo 'allowed within PyTorch infra. PLease make sure to split up'
55+
echo 'your PR into smaller pieces that can be reviewed.'
56+
echo 'If you think that this rule should not apply to your PR,'
57+
echo 'please contact @albanD or @seemethere.'
58+
echo
59+
exit 1
60+
fi

.github/scripts/test_trymerge.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ def test_main_merge(self, mock_merge: Any, mock_parse_args: Any, mock_gh_get_inf
347347
mandatory_only=False)
348348

349349
@mock.patch('trymerge.gh_graphql', side_effect=mocked_gh_graphql)
350-
def test_revert_rules(self, mock_gql: Any) -> None:
350+
@mock.patch('trymerge.read_merge_rules', side_effect=mocked_read_merge_rules)
351+
def test_revert_rules(self, mock_gql: Any, mock_mr: Any) -> None:
351352
""" Tests that reverts from collaborators are allowed """
352353
pr = GitHubPR("pytorch", "pytorch", 79694)
353354
repo = DummyGitRepo()

.github/scripts/trymerge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ def find_matching_merge_rule(pr: GitHubPR,
11141114
# Does the PR pass the checks required by this rule?
11151115
mandatory_checks = rule.mandatory_checks_name if rule.mandatory_checks_name is not None else []
11161116
checks = get_combined_checks_from_pr_and_land_validation(pr, land_check_commit)
1117-
required_checks = filter(lambda x: skip_mandatory_checks is False or "CLA Check" in x, mandatory_checks)
1117+
required_checks = filter(lambda x: skip_mandatory_checks is False or "EasyCLA" in x, mandatory_checks)
11181118
[pending_checks, failed_checks] = categorize_checks(checks, required_checks)
11191119

11201120
hud_link = f"https://hud.pytorch.org/{pr.org}/{pr.project}/commit/{pr.last_commit()['oid']}"

.github/workflows/_docs.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ jobs:
4848
- docs_type: python
4949
# It takes less than 30m to finish python docs unless there are issues
5050
timeout-minutes: 30
51+
- docs_type: functorch
52+
# It takes less than 15m to finish functorch docs unless there are issues
53+
timeout-minutes: 15
5154
steps:
5255
# [see note: pytorch repo ref]
5356
- name: Checkout PyTorch
@@ -143,3 +146,13 @@ jobs:
143146
s3-bucket: doc-previews
144147
path: cppdocs/
145148
s3-prefix: pytorch/${{ github.event.pull_request.number }}/cppdocs
149+
150+
- name: Upload functorch Docs Preview
151+
uses: seemethere/upload-artifact-s3@v5
152+
if: ${{ github.event_name == 'pull_request' && matrix.docs_type == 'functorch' && steps.build-docs.outcome == 'success' }}
153+
with:
154+
retention-days: 14
155+
s3-bucket: doc-previews
156+
if-no-files-found: error
157+
path: functorch_ghpages/nightly/
158+
s3-prefix: pytorch/${{ github.event.pull_request.number }}/functorchdocs

.github/workflows/lint.yml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -134,33 +134,7 @@ jobs:
134134
BASE: ${{ github.event.pull_request.base.sha }}
135135
HEAD: ${{ github.event.pull_request.head.sha }}
136136
run: |
137-
set -x
138-
139-
ancestor=$(git merge-base "${BASE}" "${HEAD}")
140-
details=$(git diff --shortstat "$ancestor" "${HEAD}")
141-
add=$(echo "$details" | grep -o '[0-9]* insertion' | grep -o '[0-9]*' || true)
142-
remove=$(echo "$details" | grep -o '[0-9]* deletion' | grep -o '[0-9]*' || true)
143-
144-
pr_size=0
145-
if [ "$add" ]; then
146-
pr_size=$(("$pr_size" + "$add"))
147-
fi
148-
if [ "$remove" ]; then
149-
pr_size=$(("$pr_size" + "$remove"))
150-
fi
151-
152-
if ((pr_size > 2000)); then
153-
echo
154-
echo 'Your PR is '"$pr_size"' LOC which is more than the 2000 maximum'
155-
echo 'allowed within PyTorch infra. PLease make sure to split up'
156-
echo 'your PR into smaller pieces that can be reviewed.'
157-
echo 'If you think that this rule should not apply to your PR,'
158-
echo 'please contact @albanD or @seemethere.'
159-
echo
160-
false
161-
fi
162-
163-
137+
bash .github/scripts/pr-sanity-check.sh
164138
165139
workflow-checks:
166140
name: workflow-checks

0 commit comments

Comments
 (0)