Skip to content

Commit 8cda00b

Browse files
authored
Merge branch 'main' into Add-Latest-Features-For-Autograd-Tutorial
2 parents ccc2727 + 8476a99 commit 8cda00b

40 files changed

+233
-5867
lines changed

.ci/docker/requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ ax-platform>=0.4.0
3535
nbformat>=5.9.2
3636
datasets
3737
transformers
38-
torchmultimodal-nightly # needs to be updated to stable as soon as it's avaialable
3938
onnx
4039
onnxscript>=0.2.2
4140
onnxruntime
@@ -64,7 +63,6 @@ gym-super-mario-bros==7.4.0
6463
pyopengl
6564
gymnasium[mujoco]==0.27.0
6665
timm
67-
iopath
6866
pygame==2.6.0
6967
pycocotools
7068
semilearn==0.3.2

.github/scripts/check_redirects.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
3+
if [ "$CURRENT_BRANCH" == "$BASE_BRANCH" ]; then
4+
echo "Running on $BASE_BRANCH branch. Skipping check."
5+
exit 0
6+
fi
7+
8+
9+
# Get list of deleted or renamed files in this branch compared to base
10+
DELETED_FILES=$(git diff --name-status $BASE_BRANCH $CURRENT_BRANCH --diff-filter=DR | awk '{print $2}' | grep -E '\.(rst|py|md)$' | grep -v 'redirects.py')
11+
# Check if any deleted or renamed files were found
12+
if [ -z "$DELETED_FILES" ]; then
13+
echo "No deleted or renamed files found. Skipping check."
14+
exit 0
15+
fi
16+
17+
echo "Deleted or renamed files:"
18+
echo "$DELETED_FILES"
19+
20+
# Check if redirects.py has been updated
21+
REDIRECTS_UPDATED=$(git diff --name-status $BASE_BRANCH $CURRENT_BRANCH --diff-filter=AM | grep 'redirects.py' && echo "yes" || echo "no")
22+
23+
if [ "$REDIRECTS_UPDATED" == "no" ]; then
24+
echo "ERROR: Files were deleted or renamed but redirects.py was not updated. Please update .github/scripts/redirects.py to redirect these files."
25+
exit 1
26+
fi
27+
28+
# Check if each deleted file has a redirect entry
29+
MISSING_REDIRECTS=0
30+
for FILE in $DELETED_FILES; do
31+
# Convert file path to URL path format (remove extension and adjust path)
32+
REDIRECT_PATH=$(echo $FILE | sed -E 's/(.+)_source\/(.+)\.(py|rst|md)$/\1\/\2.html/')
33+
34+
# Check if this path exists in redirects.py as a key. We don't check for values.
35+
if ! grep -q "\"$REDIRECT_PATH\":" redirects.py; then
36+
echo "ERROR: Missing redirect for deleted file: $FILE (should have entry for \"$REDIRECT_PATH\")"
37+
MISSING_REDIRECTS=1
38+
fi
39+
done
40+
41+
if [ $MISSING_REDIRECTS -eq 1 ]; then
42+
echo "ERROR: Please add redirects for all deleted/renamed files to redirects.py"
43+
exit 1
44+
fi
45+
46+
echo "All deleted/renamed files have proper redirects. Check passed!"

.github/workflows/check-redirects.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Check Redirects for Deleted or Renamed Files
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '*/**/*.rst'
7+
- '*/**/*.py'
8+
- '*/**/*.md'
9+
10+
jobs:
11+
check-redirects:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Run redirect check script
20+
run: |
21+
chmod +x ./.github/scripts/check_redirects.sh
22+
./.github/scripts/check_redirects.sh
23+
env:
24+
BASE_BRANCH: ${{ github.base_ref }}
25+
CURRENT_BRANCH: ${{ github.head_ref }}

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ download:
7878
wget -nv -N https://download.pytorch.org/models/resnet18-5c106cde.pth -P $(DATADIR)
7979
cp $(DATADIR)/resnet18-5c106cde.pth prototype_source/data/resnet18_pretrained_float.pth
8080

81-
# Download vocab for beginner_source/flava_finetuning_tutorial.py
82-
wget -nv -N http://dl.fbaipublicfiles.com/pythia/data/vocab.tar.gz -P $(DATADIR)
83-
tar $(TAROPTS) -xzf $(DATADIR)/vocab.tar.gz -C ./beginner_source/data/
84-
8581
# Download PennFudanPed dataset for intermediate_source/torchvision_tutorial.py
8682
wget https://www.cis.upenn.edu/~jshi/ped_html/PennFudanPed.zip -P $(DATADIR)
8783
unzip -o $(DATADIR)/PennFudanPed.zip -d intermediate_source/data/

_static/img/bert.png

-242 KB
Binary file not shown.

_static/img/compare_output.png

-26.4 KB
Binary file not shown.

_static/img/compare_stub.png

-22.3 KB
Binary file not shown.
-117 KB
Binary file not shown.

_static/img/quant_asym.png

-8.18 KB
Binary file not shown.
-1.93 MB
Binary file not shown.

0 commit comments

Comments
 (0)