Skip to content

Commit bb655e7

Browse files
committed
update
1 parent 475671e commit bb655e7

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

.jenkins/build.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ sudo apt-get install -y --no-install-recommends unzip p7zip-full sox libsox-dev
1818
# NS: Path to python runtime should already be part of docker container
1919
# export PATH=/opt/conda/bin:$PATH
2020
rm -rf src
21-
# NS: ghstack is not needed to build tutorials and right now it forces importlib to be downgraded to 3.X
21+
# NS: ghstack is not needed to build tutorials and right now it forces importlib to be downgraded to 3.X
2222
pip uninstall -y ghstack
2323
pip install --progress-bar off -r $DIR/../requirements.txt
2424

@@ -56,12 +56,11 @@ if [[ "${JOB_TYPE}" == "worker" ]]; then
5656
# Step 2: Keep certain tutorials based on file count, and remove runnable code in all other tutorials
5757
# IMPORTANT NOTE: We assume that each tutorial has a UNIQUE filename.
5858
FILES_TO_RUN=$(python .jenkins/get_files_to_run.py)
59-
echo "FILES_TO_RUN: " ${FILES_TO_RUN}
6059
# Files to run must be accessible to subprocessed (at least to `download_data.py`)
6160
export FILES_TO_RUN
6261

63-
# Step 3: Run `make docs` to generate HTML files and static files for these tutorials
64-
make docs
62+
make download
63+
python .jenkins/sphinx_files.py
6564

6665
# Step 4: If any of the generated files are not related the tutorial files we want to run,
6766
# then we remove them

.jenkins/sphinx_files.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import subprocess
2+
import os
3+
4+
5+
def main() -> None:
6+
files_to_run = os.environ["FILES_TO_RUN"]
7+
env = os.environ.copy()
8+
for file in files_to_run.split(" "):
9+
print(f"Running {file}")
10+
env["GALLERY_PATTERN"] = file
11+
subprocess.check_output(["make", "html"], env=env)
12+
13+
14+
if __name__ == "__main__":
15+
main()

advanced_source/super_resolution_with_onnxruntime.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,9 @@ def to_numpy(tensor):
254254

255255
from PIL import Image
256256
import torchvision.transforms as transforms
257+
import os
257258

258-
img = Image.open("./_static/img/cat.jpg")
259+
img = Image.open(os.cwd() + "../_static/img/cat.jpg")
259260

260261
resize = transforms.Resize([224, 224])
261262
img = resize(img)

0 commit comments

Comments
 (0)