Skip to content

Commit f86f2cc

Browse files
committed
update
1 parent 67497d4 commit f86f2cc

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

.jenkins/build.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,11 @@ if [[ "${JOB_TYPE}" == "worker" ]]; then
5353
# Step 2: Keep certain tutorials based on file count, and remove runnable code in all other tutorials
5454
# IMPORTANT NOTE: We assume that each tutorial has a UNIQUE filename.
5555
FILES_TO_RUN=$(python .jenkins/get_files_to_run.py)
56-
echo "FILES_TO_RUN: " ${FILES_TO_RUN}
5756
# Files to run must be accessible to subprocessed (at least to `download_data.py`)
5857
export FILES_TO_RUN
5958

60-
# Step 3: Run `make docs` to generate HTML files and static files for these tutorials
61-
make docs
59+
make download
60+
python .jenkins/sphinx_files.py
6261

6362
# Step 3.1: Run the post-processing script:
6463
python .jenkins/post_process_notebooks.py

.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)