From d649ce5fdcf86dc3f0ae73223a0ef6bc1a52145b Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Thu, 7 Nov 2024 15:19:58 -0800 Subject: [PATCH 01/17] Add last verified script --- Makefile | 3 +- insert_last_verified.py | 123 +++ output.json | 2291 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 2416 insertions(+), 1 deletion(-) create mode 100644 insert_last_verified.py create mode 100644 output.json diff --git a/Makefile b/Makefile index 19c6d597680..2e5d928ee03 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,8 @@ html-noplot: # bash .jenkins/remove_invisible_code_block_batch.sh "$(BUILDDIR)/html" @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - + @echo "Running post-processing script to insert 'Last Verified' dates..." + @python insert_last_verified.py clean-cache: make clean rm -rf advanced beginner intermediate recipes diff --git a/insert_last_verified.py b/insert_last_verified.py new file mode 100644 index 00000000000..32403fc5c60 --- /dev/null +++ b/insert_last_verified.py @@ -0,0 +1,123 @@ +import json +import os +import subprocess +from bs4 import BeautifulSoup +from datetime import datetime + +# Path to the single JSON file +json_file_path = "output.json" + +# Base directory for the generated HTML files +build_dir = "_build/html" + +# Define the source to build path mapping +source_to_build_mapping = { + "beginner": "beginner_source", + "recipes": "recipes_source", + "distributed": "distributed", + "intermediate": "intermediate_source", + "prototype": "prototype_source", + "advanced": "advanced_source" +} + +# Function to get the creation date of a file using git log +def get_creation_date(file_path): + try: + # Run git log to get the date of the first commit for the file + result = subprocess.run( + ["git", "log", "--diff-filter=A", "--format=%aD", "--", file_path], + capture_output=True, + text=True, + check=True + ) + # Check if the output is not empty + if result.stdout: + creation_date = result.stdout.splitlines()[0] + # Parse and format the date + creation_date = datetime.strptime(creation_date, "%a, %d %b %Y %H:%M:%S %z") + formatted_date = creation_date.strftime("%d %b, %Y") + else: + formatted_date = "Unknown" + return formatted_date + except subprocess.CalledProcessError: + return "Unknown" + +# Function to find the source file with any common extension +def find_source_file(base_path): + for ext in ['.rst', '.py']: + source_file_path = base_path + ext + if os.path.exists(source_file_path): + return source_file_path + return None + +# Function to process the JSON file +def process_json_file(json_file_path): + with open(json_file_path, "r", encoding="utf-8") as json_file: + json_data = json.load(json_file) + + # Process each entry in the JSON data + for entry in json_data: + path = entry["Path"] + last_verified = entry["Last Verified"] + + # Format the "Last Verified" date + try: + last_verified_date = datetime.strptime(last_verified, "%Y-%m-%d") + formatted_last_verified = last_verified_date.strftime("%d %b, %Y") + except ValueError: + formatted_last_verified = "Unknown" + + # Determine the source directory and file name + for build_subdir, source_subdir in source_to_build_mapping.items(): + if path.startswith(build_subdir): + # Construct the path to the HTML file + html_file_path = os.path.join(build_dir, path + ".html") + # Construct the base path to the source file + base_source_path = os.path.join(source_subdir, path[len(build_subdir)+1:]) + # Find the actual source file + source_file_path = find_source_file(base_source_path) + break + else: + print(f"Warning: No mapping found for path {path}") + continue + + # Check if the HTML file exists + if not os.path.exists(html_file_path): + print(f"Warning: HTML file not found for path {html_file_path}") + continue + + # Check if the source file was found + if not source_file_path: + print(f"Warning: Source file not found for path {base_source_path}") + continue + + # Get the creation date of the source file + created_on = get_creation_date(source_file_path) + + # Open and parse the HTML file + with open(html_file_path, "r", encoding="utf-8") as file: + soup = BeautifulSoup(file, "html.parser") + + # Find the first

tag and insert the "Last Verified" and "Created On" dates after it + h1_tag = soup.find("h1") + if h1_tag: + # Create a new tag for the dates + date_info_tag = soup.new_tag("p") + date_info_tag['style'] = "color: #6c6c6d; font-size: small;" + + # Add the "Created On" and "Last Verified" information + date_info_tag.string = f"Created On: {created_on} | Last Verified: {formatted_last_verified}" + + # Insert the new tag after the

tag + h1_tag.insert_after(date_info_tag) + + # Save the modified HTML back to the file + with open(html_file_path, "w", encoding="utf-8") as file: + file.write(str(soup)) + else: + print(f"Warning:

tag not found in {html_file_path}") + +# Process the single JSON file +process_json_file(json_file_path) + +print("Processing complete.") diff --git a/output.json b/output.json new file mode 100644 index 00000000000..5896863f37c --- /dev/null +++ b/output.json @@ -0,0 +1,2291 @@ +[ + { + "Path": "beginner/basics/data_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "albanD", + "Label": "basics", + "Type": "page" + }, + { + "Path": "beginner/basics/buildmodel_tutorial", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Issue": "https://github.com/pytorch/tutorials/issues/3113", + "Last Reviewed By": "albanD", + "Label": "basics", + "Type": "page" + }, + { + "Path": "beginner/deep_learning_60min_blitz", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "albanD", + "Label": "blitz, landing_page", + "Type": "page" + }, + { + "Path": "intermediate/torchvision_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "albanD", + "Label": "torchvision", + "Type": "page" + }, + { + "Path": "beginner/data_loading_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "albanD", + "Label": "save_load", + "Type": "page" + }, + { + "Path": "beginner/basics/autogradqs_tutorial", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Issue": "https://github.com/pytorch/tutorials/issues/3119", + "Last Reviewed By": "albanD", + "Label": "basics", + "Type": "page" + }, + { + "Path": "recipes/recipes/profiler_recipe", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Issue": "https://github.com/pytorch/tutorials/issues/3112", + "Last Reviewed By": "albanD", + "Label": "profiler", + "Type": "page" + }, + { + "Path": "intermediate/dynamic_quantization_bert_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "HDCharles", + "Label": "quantization", + "Type": "page" + }, + { + "Path": "advanced/dynamic_quantization_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "HDCharles", + "Label": "quantization", + "Type": "page" + }, + { + "Path": "prototype/fx_graph_mode_ptq_static", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "HDCharles", + "Label": "fx", + "Type": "page" + }, + { + "Path": "prototype/gpu_quantization_torchao_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "HDCharles", + "Label": "quantization", + "Type": "page" + }, + { + "Path": "intermediate/ddp_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "c-p-i-o", + "Label": "distributed_ddp", + "Type": "page" + }, + { + "Path": "intermediate/FSDP_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "c-p-i-o", + "Label": "distributed_fsdp", + "Type": "page" + }, + { + "Path": "intermediate/dist_tuto", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "c-p-i-o", + "Label": "distributed", + "Type": "page" + }, + { + "Path": "beginner/ddp_series_multigpu", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Issue": "https://github.com/pytorch/pytorch/issues/138833", + "Last Reviewed By": "c-p-i-o", + "Label": "distributed_ddp", + "Type": "page" + }, + { + "Path": "intermediate/FSDP_adavnced_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "c-p-i-o", + "Label": "distributed_fsdp", + "Type": "page" + }, + { + "Path": "recipes/distributed_comm_debug_mode", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "c-p-i-o", + "Label": "distributed", + "Type": "page" + }, + { + "Path": "beginner/dist_overview", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "wz337", + "Label": "landing_page", + "Type": "page" + }, + { + "Path": "distributed/home", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "wz337", + "Label": "landing_page", + "Type": "page" + }, + { + "Path": "intermediate/TP_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "wz337", + "Label": "distributed", + "Type": "page" + }, + { + "Path": "recipes/distributed_device_mesh", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "wz337", + "Label": "distributed", + "Type": "page" + }, + { + "Path": "intermediate/pipeline_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "wz337", + "Label": "distributed", + "Type": "redirect" + }, + { + "Path": "intermediate/process_group_cpp_extension_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "wz337", + "Label": "distributed", + "Type": "page" + }, + { + "Path": "advanced/generic_join", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "wz337", + "Label": "distributed", + "Type": "page" + }, + { + "Path": "intermediate/dist_pipeline_parallel_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "wz337", + "Label": "distributed", + "Type": "redirect" + }, + { + "Path": "intermediate/pipelining_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "wz337", + "Label": "distributed", + "Type": "page" + }, + { + "Path": "intermediate/TCPStore_libuv_backend", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "wz337", + "Label": "backend", + "Type": "page" + }, + { + "Path": "beginner/basics/intro", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "janeyx99", + "Label": "basics, landing_page", + "Type": "page" + }, + { + "Path": "beginner/basics/tensorqs_tutorial", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "janeyx99", + "Label": "basics", + "Type": "page" + }, + { + "Path": "beginner/basics/optimization_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "janeyx99", + "Label": "optimization", + "Type": "page" + }, + { + "Path": "beginner/blitz/tensor_tutorial", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "janeyx99", + "Label": "blitz", + "Type": "page" + }, + { + "Path": "intermediate/tensorboard_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "janeyx99", + "Label": "tensoboard", + "Type": "page" + }, + { + "Path": "recipes/recipes/tensorboard_with_pytorch", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "janeyx99", + "Label": "tensoboard", + "Type": "page" + }, + { + "Path": "advanced/cpp_extension", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "janeyx99", + "Label": "custom_ops", + "Type": "page" + }, + { + "Path": "advanced/cpp_export", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "janeyx99", + "Label": "torchscript", + "Type": "page" + }, + { + "Path": "intermediate/tensorboard_profiler_tutorial", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "janeyx99", + "Label": "tensoboard", + "Type": "redirect" + }, + { + "Path": "beginner/former_torchies/parallelism_tutorial", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "janeyx99", + "Label": "former_torchies", + "Type": "redirect" + }, + { + "Path": "beginner/ptcheat", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "janeyx99", + "Label": "core", + "Type": "page" + }, + { + "Path": "intermediate/optimizer_step_in_backward_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "janeyx99", + "Label": "optimization", + "Type": "page" + }, + { + "Path": "advanced/static_quantization_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "Jerry", + "Label": "quantization", + "Type": "page" + }, + { + "Path": "prototype/fx_graph_mode_quant_guide", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "Jerry", + "Label": "fx", + "Type": "page" + }, + { + "Path": "prototype/pt2e_quant_qat", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "Jerry", + "Label": "quantization", + "Type": "page" + }, + { + "Path": "prototype/pt2e_quant_ptq", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "Jerry", + "Label": "quantization", + "Type": "page" + }, + { + "Path": "prototype/pt2e_quantizer", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "Jerry", + "Label": "quantization", + "Type": "page" + }, + { + "Path": "prototype/quantization_in_pytorch_2_0_export_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "Jerry", + "Label": "quantization", + "Type": "redirect" + }, + { + "Path": "prototype/pt2e_quant_ptq_x86_inductor", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "Jerry", + "Label": "quantization", + "Type": "redirect" + }, + { + "Path": "prototype/pt2e_quant_x86_inductor", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "Jerry", + "Label": "quantization, inductor", + "Type": "page" + }, + { + "Path": "prototype/pt2e_quant_ptq_static", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "Jerry", + "Label": "quantization", + "Type": "page" + }, + { + "Path": "prototype/fx_graph_mode_ptq_dynamic", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "Jerry", + "Label": "fx", + "Type": "page" + }, + { + "Path": "beginner/basics/quickstart_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "jbschlosser", + "Label": "basics", + "Type": "page" + }, + { + "Path": "beginner/blitz/cifar10_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "jbschlosser", + "Label": "blitz", + "Type": "page" + }, + { + "Path": "beginner/basics/transforms_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "jbschlosser", + "Label": "basics", + "Type": "page" + }, + { + "Path": "beginner/nlp/sequence_models_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "jbschlosser", + "Label": "lstm", + "Type": "page" + }, + { + "Path": "recipes/recipes/save_load_across_devices", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "jbschlosser", + "Label": "save_load", + "Type": "redirect" + }, + { + "Path": "recipes/recipes/loading_data_recipe", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "jbschlosser", + "Label": "save_load", + "Type": "page" + }, + { + "Path": "beginner/deep_learning_nlp_tutorial", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "jbschlosser", + "Label": "nlp", + "Type": "page" + }, + { + "Path": "advanced/super_resolution_with_onnxruntime", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "lucylq", + "Label": "onnx", + "Type": "page" + }, + { + "Path": "recipes/recipes/what_is_state_dict", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "lucylq", + "Label": "core", + "Type": "page" + }, + { + "Path": "beginner/onnx/intro_onnx", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "lucylq", + "Label": "onnx, landing_page", + "Type": "page" + }, + { + "Path": "intermediate/torch_export_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Issue": "example 'Bad4' does not error out as expected, example 'Bad2' with non-strict fails, dynamic shapes example \"DynamicShapesExample1(torch.nn.Module):\" has a constraint violation during export, suggested fixes for \"DynamicShapesExample3\" do not work (the suggestions are max=16, min=16 when I run locally, the tutorial is max=16, min=17, though neither exports successfully). Typo in custom op example, def custom_op(input: torch.Tensor) --> def custom_op(x: torch.Tensor), ", + "Last Reviewed By": "lucylq", + "Label": "torch.export", + "Type": "page" + }, + { + "Path": "beginner/pytorch_with_examples", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "larryliu0820", + "Label": "intro, landing_page", + "Type": "page" + }, + { + "Path": "beginner/basics/saveloadrun_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Issue": "Links broken", + "Last Reviewed By": "larryliu0820", + "Label": "save_load", + "Type": "page" + }, + { + "Path": "beginner/introyt", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "larryliu0820", + "Label": "landing_page", + "Type": "redirect" + }, + { + "Path": "beginner/introyt/modelsyt_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Issue": "Transformers tutorial link broken", + "Last Reviewed By": "larryliu0820", + "Label": "introyt", + "Type": "page" + }, + { + "Path": "beginner/introyt/introyt1_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Issue": "Notebook is working", + "Last Reviewed By": "larryliu0820", + "Label": "introyt", + "Type": "page" + }, + { + "Path": "intermediate/reinforcement_q_learning", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "mlazos", + "Label": "torchrl", + "Type": "page" + }, + { + "Path": "beginner/blitz/autograd_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Issue": "Duplicate of https://pytorch.org/tutorials/beginner/basics/autogradqs_tutorial.html - will redirect", + "Last Reviewed By": "mlazos", + "Label": "blitz", + "Type": "page" + }, + { + "Path": "intermediate/torch_compile_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "mlazos", + "Label": "torch.compile", + "Type": "page" + }, + { + "Path": "recipes/recipes/defining_a_neural_network", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "mlazos", + "Label": "core", + "Type": "page" + }, + { + "Path": "recipes/torch_logs", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "mlazos", + "Label": "torch.logs", + "Type": "page" + }, + { + "Path": "beginner/fgsm_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "malfet", + "Label": "core", + "Type": "page" + }, + { + "Path": "intermediate/mario_rl_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "malfet", + "Label": "torchrl", + "Type": "page" + }, + { + "Path": "intermediate/nvfuser_intro_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "malfet", + "Label": "nvfuser", + "Type": "redirect" + }, + { + "Path": "advanced/coding_ddpg", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "malfet", + "Label": "torchrl", + "Type": "page" + }, + { + "Path": "advanced/custom_ops_landing_page", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "zou3519", + "Label": "custom_ops, landing_page", + "Type": "page" + }, + { + "Path": "advanced/torch_script_custom_ops", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "zou3519", + "Label": "custom_ops", + "Type": "page" + }, + { + "Path": "recipes/torch_compile_user_defined_triton_kernel_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "zou3519", + "Label": "torch.compile", + "Type": "page" + }, + { + "Path": "advanced/dispatcher", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "zou3519", + "Label": "custom_ops", + "Type": "page" + }, + { + "Path": "advanced/cpp_custom_ops", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "zou3519", + "Label": "custom_ops", + "Type": "page" + }, + { + "Path": "advanced/python_custom_ops", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "zou3519", + "Label": "custom_ops", + "Type": "page" + }, + { + "Path": "beginner/saving_loading_models", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "Saiteja64", + "Label": "save_load", + "Type": "page" + }, + { + "Path": "recipes/recipes/saving_and_loading_a_general_checkpoint", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "Saiteja64", + "Label": "save_load", + "Type": "redirect" + }, + { + "Path": "recipes/recipes/saving_and_loading_models_for_inference", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "Saiteja64", + "Label": "save_load", + "Type": "redirect" + }, + { + "Path": "recipes/distributed_checkpoint_recipe", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "Saiteja64", + "Label": "dist_checkpoint", + "Type": "page" + }, + { + "Path": "recipes/distributed_async_checkpoint_recipe", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "Saiteja64", + "Label": "dist_checkpoint", + "Type": "page" + }, + { + "Path": "intermediate/inductor_debug_cpu", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "masnesral", + "Label": "torch.compile", + "Type": "page" + }, + { + "Path": "recipes/compiling_optimizer", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "masnesral", + "Label": "torch.compile", + "Type": "page" + }, + { + "Path": "prototype/inductor_cpp_wrapper_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "masnesral", + "Label": "torch.compile", + "Type": "page" + }, + { + "Path": "recipes/torch_compile_backend_ipex", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "masnesral", + "Label": "torch.compile", + "Type": "page" + }, + { + "Path": "recipes/torch_compile_caching_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "masnesral", + "Label": "torch.compile", + "Type": "page" + }, + { + "Path": "recipes/compiling_optimizer_lr_scheduler", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "masnesral", + "Label": "torch.compile", + "Type": "page" + }, + { + "Path": "recipes/mobile_interpreter", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "byjlw", + "Label": "mobile", + "Type": "redirect" + }, + { + "Path": "beginner/introyt/trainingyt", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "svekars", + "Label": "core", + "Type": "page" + }, + { + "Path": "beginner/dcgan_faces_tutorial", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "svekars", + "Label": "core", + "Type": "page" + }, + { + "Path": "beginner/blitz/neural_networks_tutorial", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "svekars", + "Label": "blitz", + "Type": "page" + }, + { + "Path": "beginner/transformer_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Issue": "redirect", + "Last Reviewed By": "svekars", + "Label": "core", + "Type": "redirect" + }, + { + "Path": "intermediate/seq2seq_translation_tutorial", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "svekars", + "Label": "nlp", + "Type": "page" + }, + { + "Path": "beginner/introyt/tensors_deeper_tutorial", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "svekars", + "Label": "core", + "Type": "page" + }, + { + "Path": "beginner/nn_tutorial", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "svekars", + "Label": "core", + "Type": "page" + }, + { + "Path": "beginner/text_sentiment_ngrams_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "svekars", + "Label": "torchtext", + "Type": "redirect" + }, + { + "Path": "beginner/translation_transformer", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "svekars", + "Label": "torchtext", + "Type": "redirect" + }, + { + "Path": "beginner/Intro_to_TorchScript_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "svekars", + "Label": "torchscript", + "Type": "page" + }, + { + "Path": "beginner/bettertransformer_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "svekars", + "Label": "bettertransformer", + "Type": "redirect" + }, + { + "Path": "beginner/torchtext_custom_dataset_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "svekars", + "Label": "torchtext", + "Type": "page" + }, + { + "Path": "prototype/prototype_index", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "svekars", + "Label": "landing_page", + "Type": "page" + }, + { + "Path": "beginner/audio_io_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "svekars", + "Label": "audio", + "Type": "redirect" + }, + { + "Path": "beginner/examples_nn/polynomial_module", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "svekars", + "Label": "examples", + "Type": "page" + }, + { + "Path": "beginner/nlp/pytorch_tutorial", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "svekars", + "Label": "nlp", + "Type": "page" + }, + { + "Path": "beginner/examples_tensor/polynomial_tensor", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "svekars", + "Label": "examples", + "Type": "page" + }, + { + "Path": "beginner/examples_autograd/polynomial_autograd", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "svekars", + "Label": "examples", + "Type": "page" + }, + { + "Path": "recipes/recipes/warmstarting_model_using_parameters_from_a_different_model", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "svekars", + "Label": "core", + "Type": "page" + }, + { + "Path": "prototype/vulkan_workflow", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Issue": "No more OSS development, Executorch is the new thing: https://pytorch.org/executorch/stable/native-delegates-executorch-vulkan-delegate.html", + "Last Reviewed By": "SekyondaMeta", + "Label": "mobile", + "Type": "redirect" + }, + { + "Path": "prototype/ios_gpu_workflow", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "byjlw", + "Label": "mobile", + "Type": "redirect" + }, + { + "Path": "recipes/mobile_perf", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "byjlw", + "Label": "mobile", + "Type": "redirect" + }, + { + "Path": "recipes/inference_tuning_on_aws_graviton", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "svekars", + "Label": "graviton", + "Type": "page" + }, + { + "Path": "beginner/t5_tutorial", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "svekars", + "Label": "torchtext", + "Type": "page" + }, + { + "Path": "prototype/nnapi_mobilenetv2", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "byjlw", + "Label": "mobile", + "Type": "redirect" + }, + { + "Path": "recipes/cuda_rpc", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "svekars", + "Label": "distributed_rpc", + "Type": "redirect" + }, + { + "Path": "recipes/model_preparation_ios", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "byjlw", + "Label": "mobile", + "Type": "redirect" + }, + { + "Path": "prototype/graph_mode_dynamic_bert_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "svekars", + "Label": "core", + "Type": "redirect" + }, + { + "Path": "recipes/ptmobile_recipes_summary", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "byjlw", + "Label": "mobile", + "Type": "redirect" + }, + { + "Path": "beginner/examples_tensor/two_layer_net_tensor", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "svekars", + "Label": "examples", + "Type": "page" + }, + { + "Path": "recipes/distributed_rpc_profiling", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Issue": "redirect", + "Last Reviewed By": "svekars", + "Label": "distrbuted_rpc", + "Type": "redirect" + }, + { + "Path": "beginner/former_torchies/autograd_tutorial_old", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "svekars", + "Label": "former_torchies", + "Type": "redirect" + }, + { + "Path": "beginner/blitz/index", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "svekars", + "Label": "landing_page", + "Type": "page" + }, + { + "Path": "beginner/examples_tensor/two_layer_net_numpy", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "svekars", + "Label": "examples", + "Type": "page" + }, + { + "Path": "beginner/examples_autograd/two_layer_net_autograd", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Last Reviewed By": "svekars", + "Label": "examples, autograd", + "Type": "page" + }, + { + "Path": "beginner/onnx/index", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Issue": "need to exclude from the build", + "Last Reviewed By": "svekars", + "Label": "onnx, landing_page", + "Type": "page" + }, + { + "Path": "recipes/recipes/index", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Issue": "need to exclude from the build", + "Last Reviewed By": "svekars", + "Label": "landing_page", + "Type": "page" + }, + { + "Path": "beginner/hybrid_frontend_tutorial", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Issue": "Is this a better tutorial: https://github.com/pytorch/tutorials/blob/main/beginner_source/hybrid_frontend/learning_hybrid_frontend_through_example_tutorial.py ?", + "Last Reviewed By": "svekars", + "Label": "landing_page", + "Type": "page" + }, + { + "Path": "recipes/loading_data_recipe", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Issue": "Redirect", + "Last Reviewed By": "svekars", + "Label": "save_load", + "Type": "redirect" + }, + { + "Path": "beginner/transfer_learning_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "beginner/onnx/export_simple_model_to_onnx_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "onnx", + "Type": "page" + }, + { + "Path": "recipes/recipes/tuning_guide", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "beginner/hyperparameter_tuning_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "intermediate/char_rnn_classification_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "beginner/introyt/autogradyt_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core, autograd", + "Type": "page" + }, + { + "Path": "intermediate/pruning_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "recipes/recipes/amp_recipe", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "malfet", + "Label": "cuda", + "Type": "page" + }, + { + "Path": "intermediate/reinforcement_ppo", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "torchrl", + "Type": "page" + }, + { + "Path": "intermediate/model_parallel_tutorial", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Issue": "https://github.com/pytorch/tutorials/issues/3117", + "Last Reviewed By": "wz337", + "Label": "distributed", + "Type": "redirect" + }, + { + "Path": "beginner/knowledge_distillation_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "beginner/blitz/data_parallel_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "blitz", + "Type": "page" + }, + { + "Path": "advanced/cpp_frontend", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "cpp", + "Type": "page" + }, + { + "Path": "intermediate/scaled_dot_product_attention_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "torch.func", + "Type": "page" + }, + { + "Path": "intermediate/realtime_rpi", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core, ecosystem", + "Type": "page" + }, + { + "Path": "intermediate/ddp_series_multinode", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "distributed_ddp", + "Type": "page" + }, + { + "Path": "beginner/profiler", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "kit1980", + "Label": "profiler", + "Type": "page" + }, + { + "Path": "beginner/nlp/word_embeddings_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "nlp", + "Type": "page" + }, + { + "Path": "beginner/introyt/captumyt", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "captum", + "Type": "page" + }, + { + "Path": "beginner/introyt/tensorboardyt_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "svekars", + "Label": "introyt", + "Type": "page" + }, + { + "Path": "intermediate/spatial_transformer_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "beginner/ddp_series_theory", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "distributed_ddp", + "Type": "page" + }, + { + "Path": "recipes/recipes/benchmark", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "benchmark", + "Type": "page" + }, + { + "Path": "beginner/ddp_series_intro", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Issue": "https://github.com/pytorch/tutorials/issues/3116", + "Last Reviewed By": "wz337", + "Label": "distributed_ddp", + "Type": "page" + }, + { + "Path": "intermediate/flask_rest_api_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "flask", + "Type": "page" + }, + { + "Path": "beginner/chatbot_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "intermediate/char_rnn_generation_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "nlp", + "Type": "page" + }, + { + "Path": "beginner/vt_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "deit", + "Type": "page" + }, + { + "Path": "recipes/recipes/zeroing_out_gradients", + "Last Verified": "2024-11-05", + "Status": "Needs Update", + "Issue": "Why tutorial on a tiny one-line step during training?", + "Last Reviewed By": "kit1980", + "Label": "core", + "Type": "page" + }, + { + "Path": "advanced/neural_style_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core, neural_transfer", + "Type": "page" + }, + { + "Path": "beginner/nlp/deep_learning_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core, deep_learning", + "Type": "page" + }, + { + "Path": "recipes/recipes/dynamic_quantization", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "quantization", + "Type": "page" + }, + { + "Path": "intermediate/memory_format_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "memory_format", + "Type": "page" + }, + { + "Path": "recipes/quantization", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "quantization", + "Type": "page" + }, + { + "Path": "beginner/nlp/advanced_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "nlp", + "Type": "page" + }, + { + "Path": "beginner/ddp_series_fault_tolerance", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "distributed_torchrun", + "Type": "page" + }, + { + "Path": "beginner/examples_autograd/two_layer_net_custom_function", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "examples, autograd", + "Type": "page" + }, + { + "Path": "beginner/former_torchies/nnft_tutorial", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "", + "Label": "former_torchies", + "Type": "redirect" + }, + { + "Path": "intermediate/torchrec_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "torchrec", + "Type": "redirect" + }, + { + "Path": "beginner/examples_tensor/polynomial_numpy", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "examples", + "Type": "page" + }, + { + "Path": "intermediate/ensembling", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "vmap", + "Type": "page" + }, + { + "Path": "intermediate/tiatoolbox_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "WSI, ecosystem", + "Type": "page" + }, + { + "Path": "intermediate/parametrizations", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "beginner/examples_nn/two_layer_net_module", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "examples", + "Type": "page" + }, + { + "Path": "beginner/flava_finetuning_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "flava", + "Type": "page" + }, + { + "Path": "beginner/finetuning_torchvision_models_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "vision", + "Type": "redirect" + }, + { + "Path": "beginner/deeplabv3_on_ios", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "byjlw", + "Label": "mobile", + "Type": "redirect" + }, + { + "Path": "advanced/pendulum", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "torchrl", + "Type": "page" + }, + { + "Path": "intermediate/quantized_transfer_learning_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "quantization", + "Type": "page" + }, + { + "Path": "intermediate/custom_function_conv_bn_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "intermediate/rpc_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Issue": "https://github.com/pytorch/tutorials/issues/3118", + "Last Reviewed By": "", + "Label": "distributed_rpc", + "Type": "page" + }, + { + "Path": "recipes/recipes/module_load_state_dict_tips", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "save_load", + "Type": "page" + }, + { + "Path": "advanced/ddp_pipeline", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "wz337", + "Label": "distributed_ddp", + "Type": "page" + }, + { + "Path": "recipes/recipes/changing_default_device", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "recipes/recipes/saving_multiple_models_in_one_file", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "save_load", + "Type": "redirect" + }, + { + "Path": "intermediate/ddp_series_minGPT", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "distributed_ddp", + "Type": "page" + }, + { + "Path": "intermediate/forward_ad_usage", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core, autograd", + "Type": "page" + }, + { + "Path": "intermediate/per_sample_grads", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "torch.func", + "Type": "page" + }, + { + "Path": "beginner/deeplabv3_on_android", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "byjlw", + "Label": "mobile", + "Type": "redirect" + }, + { + "Path": "prototype/nestedtensor", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "nestedtensor", + "Type": "page" + }, + { + "Path": "intermediate/custom_function_double_backward_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "recipes/torchscript_inference", + "Last Verified": "2024-11-05", + "Last Reviewed By": "svekars", + "Label": "torchscript", + "Type": "page" + }, + { + "Path": "advanced/privateuseone", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "privateuse1", + "Type": "page" + }, + { + "Path": "recipes/intel_extension_for_pytorch", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "intel", + "Type": "page" + }, + { + "Path": "beginner/examples_autograd/polynomial_custom_function", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "examples", + "Type": "page" + }, + { + "Path": "recipes/fuse", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "quntization", + "Type": "page" + }, + { + "Path": "beginner/hta_intro_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "kit1980", + "Label": "hta_trace", + "Type": "page" + }, + { + "Path": "intermediate/torchserve_with_ipex", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "torchserve", + "Type": "page" + }, + { + "Path": "beginner/examples_nn/polynomial_nn", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "examples", + "Type": "page" + }, + { + "Path": "intermediate/pinmem_nonblock", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "pinmem", + "Type": "page" + }, + { + "Path": "beginner/examples_nn/dynamic_net", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "examples", + "Type": "page" + }, + { + "Path": "intermediate/fx_conv_bn_fuser", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "fx", + "Type": "page" + }, + { + "Path": "advanced/sharding", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "torchrec", + "Type": "page" + }, + { + "Path": "advanced/extend_dispatcher", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "privateuse1", + "Type": "page" + }, + { + "Path": "recipes/script_optimized", + "Last Verified": "2024-11-05", + "Last Reviewed By": "svekars", + "Label": "mobile", + "Type": "redirect" + }, + { + "Path": "intermediate/ax_multiobjective_nas_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "ax", + "Type": "page" + }, + { + "Path": "advanced/torch_script_custom_classes", + "Last Verified": "2024-11-05", + "Last Reviewed By": "svekars", + "Label": "torchscript", + "Type": "page" + }, + { + "Path": "intermediate/jacobians_hessians", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "beginner/onnx/onnx_registry_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "", + "Label": "onnx", + "Type": "page" + }, + { + "Path": "recipes/zero_redundancy_optimizer", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "distributed_ddp", + "Type": "page" + }, + { + "Path": "intermediate/torchserve_with_ipex_2", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "torchserve", + "Type": "page" + }, + { + "Path": "intermediate/speech_recognition_pipeline_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "audio", + "Type": "page" + }, + { + "Path": "beginner/examples_nn/polynomial_optim", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "examples", + "Type": "page" + }, + { + "Path": "recipes/recipes/Captum_Recipe", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "captum", + "Type": "page" + }, + { + "Path": "prototype/semi_structured_sparse", + "Last Verified": "2024-11-05", + "Last Reviewed By": "", + "Label": "sparsity", + "Type": "page" + }, + { + "Path": "advanced/cpp_autograd", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "cpp", + "Type": "page" + }, + { + "Path": "advanced/semi_structured_sparse", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "", + "Label": "sparsity", + "Type": "page" + }, + { + "Path": "intermediate/rpc_param_server_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Issue": "https://github.com/pytorch/tutorials/issues/3118", + "Last Reviewed By": "", + "Label": "distributed_rpc", + "Type": "page" + }, + { + "Path": "advanced/torch-script-parallelism", + "Last Verified": "2024-11-05", + "Last Reviewed By": "svekars", + "Label": "torchscript", + "Type": "page" + }, + { + "Path": "beginner/audio_resampling_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "", + "Label": "audio", + "Type": "redirect" + }, + { + "Path": "beginner/deploy_seq2seq_hybrid_frontend_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "torchscript", + "Type": "page" + }, + { + "Path": "intermediate/fx_profiling_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "fx", + "Type": "page" + }, + { + "Path": "beginner/audio_feature_extractions_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "", + "Label": "audio", + "Type": "redirect" + }, + { + "Path": "recipes/android_native_app_with_custom_op", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "byjlw", + "Label": "mobile", + "Type": "redirect" + }, + { + "Path": "intermediate/text_to_speech_with_torchaudio", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "", + "Label": "audio", + "Type": "redirect" + }, + { + "Path": "recipes/torchserve_vertexai_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "torchserve", + "Type": "page" + }, + { + "Path": "beginner/audio_data_augmentation_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "", + "Label": "audio", + "Type": "redirect" + }, + { + "Path": "intermediate/autograd_saved_tensors_hooks_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "intermediate/rpc_async_execution", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Issue": "https://github.com/pytorch/tutorials/issues/3118", + "Last Reviewed By": "", + "Label": "distributed_rpc", + "Type": "page" + }, + { + "Path": "intermediate/forced_alignment_with_torchaudio_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "", + "Label": "audio", + "Type": "redirect" + }, + { + "Path": "beginner/nlp/index", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "landing_page", + "Type": "page" + }, + { + "Path": "advanced/rpc_ddp_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Issue": "https://github.com/pytorch/tutorials/issues/3118", + "Last Reviewed By": "", + "Label": "distributed", + "Type": "page" + }, + { + "Path": "recipes/deployment_with_flask", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "advanced/ONNXLive", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "onnx", + "Type": "page" + }, + { + "Path": "beginner/audio_datasets_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "", + "Label": "audio", + "Type": "redirect" + }, + { + "Path": "intermediate/compiled_autograd_tutorial", + "Last Verified": "2024-10-09", + "Status": "Verified", + "Last Reviewed By": "fegin", + "Label": "compiled_autograd", + "Type": "page" + }, + { + "Path": "recipes/regional_compilation", + "Last Verified": "2024-10-10", + "Status": "Verified", + "Last Reviewed By": "oulgen", + "Label": "torch_compile", + "Type": "page" + }, + { + "Path": "intermediate/torchrec_intro_tutorial", + "Last Verified": "2024-10-02", + "Status": "Verified", + "Last Reviewed By": "iamzainhuda", + "Label": "torchrec", + "Type": "page" + }, + { + "Path": "prototype/flight_recorder_tutorial", + "Last Verified": "2024-09-09", + "Status": "Verified", + "Last Reviewed By": "fduwjj", + "Label": "distributed", + "Type": "page" + }, + { + "Path": "prototype/inductor_windows_cpu", + "Last Verified": "2024-10-01", + "Status": "Verified", + "Last Reviewed By": "agunapal", + "Label": "inductor", + "Type": "page" + }, + { + "Path": "prototype/max_autotune_on_CPU_tutorial", + "Last Verified": "2024-10-10", + "Status": "Verified", + "Last Reviewed By": "jgong5", + "Label": "inductor", + "Type": "page" + }, + { + "Path": "prototype/python_extension_autoload", + "Last Verified": "2024-10-10", + "Status": "Verified", + "Last Reviewed By": "jgong5", + "Label": "backend, intel", + "Type": "page" + }, + { + "Path": "prototype/vmap_recipe", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "vmap", + "Type": "page" + }, + { + "Path": "beginner/hta_trace_diff_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "hta_trace", + "Type": "page" + }, + { + "Path": "intermediate/neural_tangent_kernels", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "torch.func", + "Type": "page" + }, + { + "Path": "prototype/skip_param_init", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "advanced/numpy_extensions_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "core", + "Type": "page" + }, + { + "Path": "recipes/amx", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "intel.amx", + "Type": "page" + }, + { + "Path": "advanced/usb_semisup_learn", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "semisupervised_learning, ecosystem", + "Type": "page" + }, + { + "Path": "recipes/model_preparation_android", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "byjlw", + "Label": "mobile", + "Type": "redirect" + }, + { + "Path": "recipes/recipes/timer_quick_start", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "benchmark", + "Type": "page" + }, + { + "Path": "prototype/numeric_suite_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "quantization", + "Type": "page" + }, + { + "Path": "recipes/recipes/swap_tensors", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "save_load", + "Type": "page" + }, + { + "Path": "prototype/torchscript_freezing", + "Last Verified": "2024-11-05", + "Last Reviewed By": "svekars", + "Label": "torchscript", + "Type": "page" + }, + { + "Path": "beginner/audio_feature_augmentation_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "audio", + "Type": "redirect" + }, + { + "Path": "recipes/intel_neural_compressor_for_pytorch", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "intel.quantization", + "Type": "page" + }, + { + "Path": "recipes/recipes/reasoning_about_shapes", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "intro", + "Type": "page" + }, + { + "Path": "beginner/examples_nn/two_layer_net_optim", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "examples", + "Type": "page" + }, + { + "Path": "intermediate/dqn_with_rnn_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "torchrl", + "Type": "page" + }, + { + "Path": "beginner/former_torchies_tutorial", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "", + "Label": "former_torchies", + "Type": "redirect" + }, + { + "Path": "prototype/ios_coreml_workflow", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "byjlw", + "Label": "mobile", + "Type": "redirect" + }, + { + "Path": "recipes/profile_with_itt", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "intel.xpu", + "Type": "page" + }, + { + "Path": "intermediate/torch_export_nightly_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "", + "Label": "torch.export", + "Type": "page" + }, + { + "Path": "prototype/backend_config_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "torchao", + "Type": "page" + }, + { + "Path": "recipes/distributed_optim_torchscript", + "Last Verified": "2024-11-05", + "Last Reviewed By": "svekars", + "Label": "torchscript", + "Type": "page" + }, + { + "Path": "beginner/examples_nn/two_layer_net_nn", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "intro", + "Type": "page" + }, + { + "Path": "prototype/maskedtensor_overview", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "maskedtensor", + "Type": "page" + }, + { + "Path": "beginner/template_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "template", + "Type": "template" + }, + { + "Path": "intermediate/coding_ddpg", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "torchrl", + "Type": "page" + }, + { + "Path": "beginner/former_torchies/tensor_tutorial_old", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "", + "Label": "former_torchies", + "Type": "page" + }, + { + "Path": "recipes/bundled_inputs", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "mobile", + "Type": "page" + }, + { + "Path": "prototype/maskedtensor_sparsity", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "maskedtensor", + "Type": "page" + }, + { + "Path": "prototype/tracing_based_selective_build", + "Last Verified": "2024-11-05", + "Status": "Deprecated", + "Last Reviewed By": "", + "Label": "mobile", + "Type": "redirect" + }, + { + "Path": "prototype/maskedtensor_advanced_semantics", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "maskedtensor", + "Type": "page" + }, + { + "Path": "advanced/cpp_cuda_graphs", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "cuda", + "Type": "redirect" + }, + { + "Path": "beginner/hybrid_frontend/learning_hybrid_frontend_through_example_tutorial", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "hybrid_frontend", + "Type": "page" + }, + { + "Path": "prototype/maskedtensor_adagrad", + "Last Verified": "2024-11-05", + "Status": "Not Verified", + "Last Reviewed By": "", + "Label": "maskedtensor", + "Type": "page" + }, + { + "Path": "recipes/torch_export_aoti_python", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "", + "Label": "torch.export", + "Type": "page" + }, + { + "Path": "recipes/xeon_run_cpu", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "", + "Label": "xeon", + "Type": "page" + }, + { + "Path": "prototype/distributed_rpc_profiling", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Issue": "Redirect", + "Last Reviewed By": "", + "Label": "rpc", + "Type": "redirect" + }, + { + "Path": "index", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "svekars", + "Label": "landing_page", + "Type": "page" + }, + { + "Path": "introyt/introyt_index", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "svekars", + "Label": "landing_page", + "Type": "page" + }, + { + "Path": " intermediate_source/FSDP_adavnced_tutorial", + "Last Verified": "2024-11-05", + "Status": "Verified", + "Last Reviewed By": "c-p-i-o", + "Label": "distributed", + "Type": "page" + } +] From c87914c45a21ca9d3149836fdeb914679c90a53b Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Fri, 8 Nov 2024 15:34:27 -0800 Subject: [PATCH 02/17] Add tutorial status info --- Makefile | 3 +- .../deep_learning_nlp_tutorial.rst | 12 ++ .../{t5_tutoria.rst => t5_tutorial.rst} | 2 + insert_last_verified.py | 155 +++++++++----- intermediate_source/pipeline_tutorial.rst | 2 + output.json => tutorials-review-data.json | 192 ++++++++---------- 6 files changed, 208 insertions(+), 158 deletions(-) create mode 100644 beginner_source/deep_learning_nlp_tutorial.rst rename beginner_source/{t5_tutoria.rst => t5_tutorial.rst} (96%) rename output.json => tutorials-review-data.json (94%) diff --git a/Makefile b/Makefile index 2e5d928ee03..159dce15605 100644 --- a/Makefile +++ b/Makefile @@ -89,6 +89,7 @@ download: docs: make download make html + @python insert_last_verified.py $(BUILDDIR)/html rm -rf docs cp -r $(BUILDDIR)/html docs touch docs/.nojekyll @@ -99,7 +100,7 @@ html-noplot: @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." @echo "Running post-processing script to insert 'Last Verified' dates..." - @python insert_last_verified.py + @python insert_last_verified.py $(BUILDDIR)/html clean-cache: make clean rm -rf advanced beginner intermediate recipes diff --git a/beginner_source/deep_learning_nlp_tutorial.rst b/beginner_source/deep_learning_nlp_tutorial.rst new file mode 100644 index 00000000000..23e0fff5606 --- /dev/null +++ b/beginner_source/deep_learning_nlp_tutorial.rst @@ -0,0 +1,12 @@ +:orphan: + +Deep Learning for NLP with Pytorch +=================================== + +This tutorial has been deprecated. + +Redirecting to a newer tutorial in 3 seconds... + +.. raw:: html + + diff --git a/beginner_source/t5_tutoria.rst b/beginner_source/t5_tutorial.rst similarity index 96% rename from beginner_source/t5_tutoria.rst rename to beginner_source/t5_tutorial.rst index 65de42b9320..c1f8af13a71 100644 --- a/beginner_source/t5_tutoria.rst +++ b/beginner_source/t5_tutorial.rst @@ -1,3 +1,5 @@ +:orphan: + T5-Base Model for Summarization, Sentiment Classification, and Translation ========================================================================== diff --git a/insert_last_verified.py b/insert_last_verified.py index 32403fc5c60..e7ffc4ba663 100644 --- a/insert_last_verified.py +++ b/insert_last_verified.py @@ -1,39 +1,56 @@ import json import os import subprocess -from bs4 import BeautifulSoup +import sys from datetime import datetime -# Path to the single JSON file -json_file_path = "output.json" - -# Base directory for the generated HTML files -build_dir = "_build/html" +from bs4 import BeautifulSoup -# Define the source to build path mapping +# Check if the build directory is provided as an argument in the Makefile +if len(sys.argv) < 2: + print("Error: Build directory not provided. Exiting.") + exit(1) + +build_dir = sys.argv[1] +print(f"Build directory: {build_dir}") + +json_file_path = "tutorials-review-data.json" +build_dir = "_build/html" # for testing after _build/html is created + +# paths to skip from the post-processing script +paths_to_skip = [ + "beginner/examples_autograd/two_layer_net_custom_function", # not present in the repo + "beginner/examples_nn/two_layer_net_module", # not present in the repo + "beginner/examples_tensor/two_layer_net_numpy", # not present in the repo + "beginner/examples_tensor/two_layer_net_tensor", # not present in the repo + "beginner/examples_autograd/two_layer_net_autograd", # not present in the repo + "beginner/examples_nn/two_layer_net_optim", # not present in the repo + "beginner/examples_nn/two_layer_net_nn", # not present in the repo + "intermediate/coding_ddpg", # not present in the repo - will delete the carryover +] +# Mapping of source directories to build directories source_to_build_mapping = { "beginner": "beginner_source", "recipes": "recipes_source", "distributed": "distributed", "intermediate": "intermediate_source", "prototype": "prototype_source", - "advanced": "advanced_source" + "advanced": "advanced_source", + "": "", # root dir for index.rst } -# Function to get the creation date of a file using git log + +# Use git log to get the creation date of the file def get_creation_date(file_path): try: - # Run git log to get the date of the first commit for the file result = subprocess.run( ["git", "log", "--diff-filter=A", "--format=%aD", "--", file_path], capture_output=True, text=True, - check=True + check=True, ) - # Check if the output is not empty if result.stdout: creation_date = result.stdout.splitlines()[0] - # Parse and format the date creation_date = datetime.strptime(creation_date, "%a, %d %b %Y %H:%M:%S %z") formatted_date = creation_date.strftime("%d %b, %Y") else: @@ -42,82 +59,122 @@ def get_creation_date(file_path): except subprocess.CalledProcessError: return "Unknown" -# Function to find the source file with any common extension + +# Use git log to get the last updated date of the file +def get_last_updated_date(file_path): + try: + result = subprocess.run( + ["git", "log", "-1", "--format=%aD", "--", file_path], + capture_output=True, + text=True, + check=True, + ) + if result.stdout: + last_updated_date = result.stdout.strip() + last_updated_date = datetime.strptime( + last_updated_date, "%a, %d %b %Y %H:%M:%S %z" + ) + formatted_date = last_updated_date.strftime("%d %b, %Y") + else: + formatted_date = "Unknown" + return formatted_date + except subprocess.CalledProcessError: + return "Unknown" + + +# Try to find the source file with the given base path and the extensions .rst and .py def find_source_file(base_path): - for ext in ['.rst', '.py']: + for ext in [".rst", ".py"]: source_file_path = base_path + ext if os.path.exists(source_file_path): return source_file_path return None -# Function to process the JSON file + +# Function to process a JSON file and insert the "Last Verified" information into the HTML files def process_json_file(json_file_path): with open(json_file_path, "r", encoding="utf-8") as json_file: json_data = json.load(json_file) - # Process each entry in the JSON data for entry in json_data: path = entry["Path"] last_verified = entry["Last Verified"] + status = entry.get("Status", "") + if path in paths_to_skip: + print(f"Skipping path: {path}") + continue + if status in ["needs update", "not verified"]: + formatted_last_verified = "Not Verified" + elif last_verified: + try: + last_verified_date = datetime.strptime(last_verified, "%Y-%m-%d") + formatted_last_verified = last_verified_date.strftime("%d %b, %Y") + except ValueError: + formatted_last_verified = "Unknown" + else: + formatted_last_verified = "Not Verified" + if status == "deprecated": + formatted_last_verified += "Deprecated" - # Format the "Last Verified" date - try: - last_verified_date = datetime.strptime(last_verified, "%Y-%m-%d") - formatted_last_verified = last_verified_date.strftime("%d %b, %Y") - except ValueError: - formatted_last_verified = "Unknown" - - # Determine the source directory and file name for build_subdir, source_subdir in source_to_build_mapping.items(): if path.startswith(build_subdir): - # Construct the path to the HTML file html_file_path = os.path.join(build_dir, path + ".html") - # Construct the base path to the source file - base_source_path = os.path.join(source_subdir, path[len(build_subdir)+1:]) - # Find the actual source file + base_source_path = os.path.join( + source_subdir, path[len(build_subdir) + 1 :] + ) source_file_path = find_source_file(base_source_path) break else: print(f"Warning: No mapping found for path {path}") continue - # Check if the HTML file exists if not os.path.exists(html_file_path): - print(f"Warning: HTML file not found for path {html_file_path}") + print( + f"Warning: HTML file not found for path {html_file_path}." + "If this is a new tutorial, please add it to the audit JSON file and set the Verified status and todays's date." + ) continue - # Check if the source file was found if not source_file_path: - print(f"Warning: Source file not found for path {base_source_path}") + print(f"Warning: Source file not found for path {base_source_path}.") continue - # Get the creation date of the source file created_on = get_creation_date(source_file_path) + last_updated = get_last_updated_date(source_file_path) - # Open and parse the HTML file with open(html_file_path, "r", encoding="utf-8") as file: soup = BeautifulSoup(file, "html.parser") + # Check if the

tag with class "date-info-last-verified" already exists + existing_date_info = soup.find("p", {"class": "date-info-last-verified"}) + if existing_date_info: + print( + f"Warning:

tag with class 'date-info-last-verified' already exists in {html_file_path}" + ) + continue - # Find the first

tag and insert the "Last Verified" and "Created On" dates after it - h1_tag = soup.find("h1") + h1_tag = soup.find("h1") # Find the h1 tag to insert the dates if h1_tag: - # Create a new tag for the dates - date_info_tag = soup.new_tag("p") - date_info_tag['style'] = "color: #6c6c6d; font-size: small;" - - # Add the "Created On" and "Last Verified" information - date_info_tag.string = f"Created On: {created_on} | Last Verified: {formatted_last_verified}" - + date_info_tag = soup.new_tag("p", **{"class": "date-info-last-verified"}) + date_info_tag["style"] = "color: #6c6c6d; font-size: small;" + # Add the "Created On", "Last Updated", and "Last Verified" information + date_info_tag.string = ( + f"Created On: {created_on} | " + f"Last Updated: {last_updated} | " + f"Last Verified: {formatted_last_verified}" + ) # Insert the new tag after the

tag h1_tag.insert_after(date_info_tag) - - # Save the modified HTML back to the file + # Save back to the HTML. with open(html_file_path, "w", encoding="utf-8") as file: file.write(str(soup)) else: print(f"Warning:

tag not found in {html_file_path}") -# Process the single JSON file -process_json_file(json_file_path) -print("Processing complete.") +process_json_file(json_file_path) +print( + f"Finished processing JSON file. Please check the output for any warnings. " + "Pages like `nlp/index.html` are generated only during the full `make docs` " + "or `make html` build. Warnings about these files when you run `make html-noplot` " + "can be ignored." +) diff --git a/intermediate_source/pipeline_tutorial.rst b/intermediate_source/pipeline_tutorial.rst index 06f10a4a884..ade3c9b0aa4 100644 --- a/intermediate_source/pipeline_tutorial.rst +++ b/intermediate_source/pipeline_tutorial.rst @@ -1,3 +1,5 @@ +:orphan: + Training Transformer models using Pipeline Parallelism ====================================================== diff --git a/output.json b/tutorials-review-data.json similarity index 94% rename from output.json rename to tutorials-review-data.json index 5896863f37c..ef441c9fc59 100644 --- a/output.json +++ b/tutorials-review-data.json @@ -9,7 +9,7 @@ }, { "Path": "beginner/basics/buildmodel_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Needs Update", "Issue": "https://github.com/pytorch/tutorials/issues/3113", "Last Reviewed By": "albanD", @@ -51,7 +51,7 @@ }, { "Path": "recipes/recipes/profiler_recipe", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Needs Update", "Issue": "https://github.com/pytorch/tutorials/issues/3112", "Last Reviewed By": "albanD", @@ -116,7 +116,7 @@ }, { "Path": "beginner/ddp_series_multigpu", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Needs Update", "Issue": "https://github.com/pytorch/pytorch/issues/138833", "Last Reviewed By": "c-p-i-o", @@ -124,7 +124,7 @@ "Type": "page" }, { - "Path": "intermediate/FSDP_adavnced_tutorial", + "Path": "intermediate/FSDP_advanced_tutorial", "Last Verified": "2024-11-05", "Status": "Verified", "Last Reviewed By": "c-p-i-o", @@ -230,7 +230,7 @@ { "Path": "beginner/basics/tensorqs_tutorial", "Last Verified": "2024-11-05", - "Status": "Needs Update", + "Status": "Verified", "Last Reviewed By": "janeyx99", "Label": "basics", "Type": "page" @@ -246,7 +246,7 @@ { "Path": "beginner/blitz/tensor_tutorial", "Last Verified": "2024-11-05", - "Status": "Needs Update", + "Status": "Verified", "Last Reviewed By": "janeyx99", "Label": "blitz", "Type": "page" @@ -379,14 +379,6 @@ "Label": "quantization, inductor", "Type": "page" }, - { - "Path": "prototype/pt2e_quant_ptq_static", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "Jerry", - "Label": "quantization", - "Type": "page" - }, { "Path": "prototype/fx_graph_mode_ptq_dynamic", "Last Verified": "2024-11-05", @@ -397,7 +389,7 @@ }, { "Path": "beginner/basics/quickstart_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "jbschlosser", "Label": "basics", @@ -405,7 +397,7 @@ }, { "Path": "beginner/blitz/cifar10_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "jbschlosser", "Label": "blitz", @@ -413,7 +405,7 @@ }, { "Path": "beginner/basics/transforms_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "jbschlosser", "Label": "basics", @@ -421,7 +413,7 @@ }, { "Path": "beginner/nlp/sequence_models_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "jbschlosser", "Label": "lstm", @@ -430,26 +422,18 @@ { "Path": "recipes/recipes/save_load_across_devices", "Last Verified": "2024-11-05", - "Status": "Verified", + "Status": "Deprecated", "Last Reviewed By": "jbschlosser", "Label": "save_load", "Type": "redirect" }, { - "Path": "recipes/recipes/loading_data_recipe", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "jbschlosser", - "Label": "save_load", - "Type": "page" - }, - { - "Path": "beginner/deep_learning_nlp_tutorial", + "Path": "recipes/loading_data_recipe", "Last Verified": "2024-11-05", "Status": "Deprecated", "Last Reviewed By": "jbschlosser", - "Label": "nlp", - "Type": "page" + "Label": "save_load", + "Type": "redirect" }, { "Path": "advanced/super_resolution_with_onnxruntime", @@ -570,7 +554,7 @@ }, { "Path": "beginner/fgsm_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "malfet", "Label": "core", @@ -578,7 +562,7 @@ }, { "Path": "intermediate/mario_rl_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "malfet", "Label": "torchrl", @@ -586,7 +570,7 @@ }, { "Path": "intermediate/nvfuser_intro_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "malfet", "Label": "nvfuser", @@ -594,7 +578,7 @@ }, { "Path": "advanced/coding_ddpg", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "malfet", "Label": "torchrl", @@ -1014,24 +998,23 @@ { "Path": "beginner/examples_tensor/two_layer_net_numpy", "Last Verified": "2024-11-05", - "Status": "Needs Update", + "Status": "Deprecated", "Last Reviewed By": "svekars", "Label": "examples", - "Type": "page" + "Type": "redirect" }, { "Path": "beginner/examples_autograd/two_layer_net_autograd", "Last Verified": "2024-11-05", - "Status": "Needs Update", + "Status": "Deprecated", "Last Reviewed By": "svekars", "Label": "examples, autograd", - "Type": "page" + "Type": "redirect" }, { "Path": "beginner/onnx/index", "Last Verified": "2024-11-05", "Status": "Verified", - "Issue": "need to exclude from the build", "Last Reviewed By": "svekars", "Label": "onnx, landing_page", "Type": "page" @@ -1074,8 +1057,8 @@ { "Path": "beginner/onnx/export_simple_model_to_onnx_tutorial", "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", + "Status": "Verified", + "Last Reviewed By": "tugsbayasgalan", "Label": "onnx", "Type": "page" }, @@ -1692,13 +1675,13 @@ "Path": "beginner/onnx/onnx_registry_tutorial", "Last Verified": "2024-11-05", "Status": "Verified", - "Last Reviewed By": "", + "Last Reviewed By": "tugsbayasgalan", "Label": "onnx", "Type": "page" }, { "Path": "recipes/zero_redundancy_optimizer", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "distributed_ddp", @@ -1706,7 +1689,7 @@ }, { "Path": "intermediate/torchserve_with_ipex_2", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "torchserve", @@ -1714,15 +1697,15 @@ }, { "Path": "intermediate/speech_recognition_pipeline_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", + "Last Verified": "", + "Status": "Deprecated", "Last Reviewed By": "", "Label": "audio", - "Type": "page" + "Type": "redirect" }, { "Path": "beginner/examples_nn/polynomial_optim", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "examples", @@ -1730,7 +1713,7 @@ }, { "Path": "recipes/recipes/Captum_Recipe", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "captum", @@ -1739,13 +1722,14 @@ { "Path": "prototype/semi_structured_sparse", "Last Verified": "2024-11-05", + "Status": "Duplicate", "Last Reviewed By": "", "Label": "sparsity", "Type": "page" }, { "Path": "advanced/cpp_autograd", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "cpp", @@ -1761,7 +1745,7 @@ }, { "Path": "intermediate/rpc_param_server_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Issue": "https://github.com/pytorch/tutorials/issues/3118", "Last Reviewed By": "", @@ -1778,7 +1762,7 @@ { "Path": "beginner/audio_resampling_tutorial", "Last Verified": "2024-11-05", - "Status": "Verified", + "Status": "Deprecated", "Last Reviewed By": "", "Label": "audio", "Type": "redirect" @@ -1786,14 +1770,14 @@ { "Path": "beginner/deploy_seq2seq_hybrid_frontend_tutorial", "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", + "Status": "Verified", + "Last Reviewed By": "svekars", "Label": "torchscript", "Type": "page" }, { "Path": "intermediate/fx_profiling_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "fx", @@ -1802,7 +1786,7 @@ { "Path": "beginner/audio_feature_extractions_tutorial", "Last Verified": "2024-11-05", - "Status": "Verified", + "Status": "Deprecated", "Last Reviewed By": "", "Label": "audio", "Type": "redirect" @@ -1818,14 +1802,14 @@ { "Path": "intermediate/text_to_speech_with_torchaudio", "Last Verified": "2024-11-05", - "Status": "Verified", + "Status": "Deprecated", "Last Reviewed By": "", "Label": "audio", "Type": "redirect" }, { "Path": "recipes/torchserve_vertexai_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "torchserve", @@ -1841,7 +1825,7 @@ }, { "Path": "intermediate/autograd_saved_tensors_hooks_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "core", @@ -1849,7 +1833,7 @@ }, { "Path": "intermediate/rpc_async_execution", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Issue": "https://github.com/pytorch/tutorials/issues/3118", "Last Reviewed By": "", @@ -1859,14 +1843,14 @@ { "Path": "intermediate/forced_alignment_with_torchaudio_tutorial", "Last Verified": "2024-11-05", - "Status": "Verified", + "Status": "Deprecated", "Last Reviewed By": "", "Label": "audio", "Type": "redirect" }, { "Path": "beginner/nlp/index", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "landing_page", @@ -1874,7 +1858,7 @@ }, { "Path": "advanced/rpc_ddp_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Issue": "https://github.com/pytorch/tutorials/issues/3118", "Last Reviewed By": "", @@ -1883,7 +1867,7 @@ }, { "Path": "recipes/deployment_with_flask", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "core", @@ -1892,15 +1876,15 @@ { "Path": "advanced/ONNXLive", "Last Verified": "2024-11-05", - "Status": "Not Verified", + "Status": "Deprecated", "Last Reviewed By": "", "Label": "onnx", - "Type": "page" + "Type": "redirect" }, { "Path": "beginner/audio_datasets_tutorial", "Last Verified": "2024-11-05", - "Status": "Verified", + "Status": "Deprecated", "Last Reviewed By": "", "Label": "audio", "Type": "redirect" @@ -1963,7 +1947,7 @@ }, { "Path": "prototype/vmap_recipe", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "vmap", @@ -1971,7 +1955,7 @@ }, { "Path": "beginner/hta_trace_diff_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "hta_trace", @@ -1979,7 +1963,7 @@ }, { "Path": "intermediate/neural_tangent_kernels", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "torch.func", @@ -1987,7 +1971,7 @@ }, { "Path": "prototype/skip_param_init", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "core", @@ -1995,7 +1979,7 @@ }, { "Path": "advanced/numpy_extensions_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "core", @@ -2003,7 +1987,7 @@ }, { "Path": "recipes/amx", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "intel.amx", @@ -2011,7 +1995,7 @@ }, { "Path": "advanced/usb_semisup_learn", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "semisupervised_learning, ecosystem", @@ -2027,7 +2011,7 @@ }, { "Path": "recipes/recipes/timer_quick_start", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "benchmark", @@ -2035,7 +2019,7 @@ }, { "Path": "prototype/numeric_suite_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "quantization", @@ -2043,7 +2027,7 @@ }, { "Path": "recipes/recipes/swap_tensors", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "save_load", @@ -2059,14 +2043,14 @@ { "Path": "beginner/audio_feature_augmentation_tutorial", "Last Verified": "2024-11-05", - "Status": "Not Verified", + "Status": "Deprecated", "Last Reviewed By": "", "Label": "audio", "Type": "redirect" }, { "Path": "recipes/intel_neural_compressor_for_pytorch", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "intel.quantization", @@ -2074,7 +2058,7 @@ }, { "Path": "recipes/recipes/reasoning_about_shapes", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "intro", @@ -2082,7 +2066,7 @@ }, { "Path": "beginner/examples_nn/two_layer_net_optim", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "examples", @@ -2090,7 +2074,7 @@ }, { "Path": "intermediate/dqn_with_rnn_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "torchrl", @@ -2107,14 +2091,14 @@ { "Path": "prototype/ios_coreml_workflow", "Last Verified": "2024-11-05", - "Status": "Verified", + "Status": "Deprecated", "Last Reviewed By": "byjlw", "Label": "mobile", "Type": "redirect" }, { "Path": "recipes/profile_with_itt", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "intel.xpu", @@ -2130,7 +2114,7 @@ }, { "Path": "prototype/backend_config_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "torchao", @@ -2139,13 +2123,14 @@ { "Path": "recipes/distributed_optim_torchscript", "Last Verified": "2024-11-05", + "Status": "Verified", "Last Reviewed By": "svekars", "Label": "torchscript", "Type": "page" }, { "Path": "beginner/examples_nn/two_layer_net_nn", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "intro", @@ -2153,7 +2138,7 @@ }, { "Path": "prototype/maskedtensor_overview", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "maskedtensor", @@ -2161,39 +2146,31 @@ }, { "Path": "beginner/template_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "template", "Type": "template" }, - { - "Path": "intermediate/coding_ddpg", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "torchrl", - "Type": "page" - }, { "Path": "beginner/former_torchies/tensor_tutorial_old", "Last Verified": "2024-11-05", "Status": "Deprecated", "Last Reviewed By": "", "Label": "former_torchies", - "Type": "page" + "Type": "redirect" }, { "Path": "recipes/bundled_inputs", "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", + "Status": "Verified", + "Last Reviewed By": "Jacob Szwejbka", "Label": "mobile", "Type": "page" }, { "Path": "prototype/maskedtensor_sparsity", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "maskedtensor", @@ -2209,7 +2186,7 @@ }, { "Path": "prototype/maskedtensor_advanced_semantics", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "maskedtensor", @@ -2217,7 +2194,7 @@ }, { "Path": "advanced/cpp_cuda_graphs", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "cuda", @@ -2225,7 +2202,7 @@ }, { "Path": "beginner/hybrid_frontend/learning_hybrid_frontend_through_example_tutorial", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "hybrid_frontend", @@ -2233,7 +2210,7 @@ }, { "Path": "prototype/maskedtensor_adagrad", - "Last Verified": "2024-11-05", + "Last Verified": "", "Status": "Not Verified", "Last Reviewed By": "", "Label": "maskedtensor", @@ -2259,13 +2236,12 @@ "Path": "prototype/distributed_rpc_profiling", "Last Verified": "2024-11-05", "Status": "Verified", - "Issue": "Redirect", "Last Reviewed By": "", "Label": "rpc", "Type": "redirect" }, { - "Path": "index", + "Path": "./index", "Last Verified": "2024-11-05", "Status": "Verified", "Last Reviewed By": "svekars", @@ -2273,7 +2249,7 @@ "Type": "page" }, { - "Path": "introyt/introyt_index", + "Path": "beginner/introyt/introyt_index", "Last Verified": "2024-11-05", "Status": "Verified", "Last Reviewed By": "svekars", @@ -2281,7 +2257,7 @@ "Type": "page" }, { - "Path": " intermediate_source/FSDP_adavnced_tutorial", + "Path": "intermediate/FSDP_advanced_tutorial", "Last Verified": "2024-11-05", "Status": "Verified", "Last Reviewed By": "c-p-i-o", From 55f16ae58ba13f74b95b9e214504a00ffb3bbfc4 Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Tue, 12 Nov 2024 14:21:23 -0800 Subject: [PATCH 03/17] Update date format --- insert_last_verified.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/insert_last_verified.py b/insert_last_verified.py index e7ffc4ba663..7f3e4bbbfdf 100644 --- a/insert_last_verified.py +++ b/insert_last_verified.py @@ -52,7 +52,7 @@ def get_creation_date(file_path): if result.stdout: creation_date = result.stdout.splitlines()[0] creation_date = datetime.strptime(creation_date, "%a, %d %b %Y %H:%M:%S %z") - formatted_date = creation_date.strftime("%d %b, %Y") + formatted_date = creation_date.strftime("%b %d, %Y") else: formatted_date = "Unknown" return formatted_date @@ -74,7 +74,7 @@ def get_last_updated_date(file_path): last_updated_date = datetime.strptime( last_updated_date, "%a, %d %b %Y %H:%M:%S %z" ) - formatted_date = last_updated_date.strftime("%d %b, %Y") + formatted_date = last_updated_date.strftime("%b %d, %Y") else: formatted_date = "Unknown" return formatted_date @@ -108,7 +108,7 @@ def process_json_file(json_file_path): elif last_verified: try: last_verified_date = datetime.strptime(last_verified, "%Y-%m-%d") - formatted_last_verified = last_verified_date.strftime("%d %b, %Y") + formatted_last_verified = last_verified_date.strftime("%b %d, %Y") except ValueError: formatted_last_verified = "Unknown" else: From deb57326c1f4d4453d6c3bdaa8805a388a5fa046 Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Mon, 25 Nov 2024 14:55:46 -0800 Subject: [PATCH 04/17] Update Makefile to download the json file Delete the JSON from the main branch --- Makefile | 8 + tutorials-review-data.json | 2267 ------------------------------------ 2 files changed, 8 insertions(+), 2267 deletions(-) delete mode 100644 tutorials-review-data.json diff --git a/Makefile b/Makefile index 159dce15605..356ad1130a6 100644 --- a/Makefile +++ b/Makefile @@ -86,21 +86,29 @@ download: wget https://www.cis.upenn.edu/~jshi/ped_html/PennFudanPed.zip -P $(DATADIR) unzip -o $(DATADIR)/PennFudanPed.zip -d intermediate_source/data/ +download-last-reviewed-json: + curl -o tutorials-review-data.json https://raw.githubusercontent.com/pytorch/tutorials/refs/heads/last-reviewed-data-json/tutorials-review-data.json + docs: make download + make download-last-reviewed-json make html @python insert_last_verified.py $(BUILDDIR)/html rm -rf docs cp -r $(BUILDDIR)/html docs touch docs/.nojekyll + rm -rf tutorials-review-data.json html-noplot: $(SPHINXBUILD) -D plot_gallery=0 -b html $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/html" # bash .jenkins/remove_invisible_code_block_batch.sh "$(BUILDDIR)/html" @echo + make download-last-reviewed-json @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." @echo "Running post-processing script to insert 'Last Verified' dates..." @python insert_last_verified.py $(BUILDDIR)/html + rm -rf tutorials-review-data.json + clean-cache: make clean rm -rf advanced beginner intermediate recipes diff --git a/tutorials-review-data.json b/tutorials-review-data.json deleted file mode 100644 index ef441c9fc59..00000000000 --- a/tutorials-review-data.json +++ /dev/null @@ -1,2267 +0,0 @@ -[ - { - "Path": "beginner/basics/data_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "albanD", - "Label": "basics", - "Type": "page" - }, - { - "Path": "beginner/basics/buildmodel_tutorial", - "Last Verified": "", - "Status": "Needs Update", - "Issue": "https://github.com/pytorch/tutorials/issues/3113", - "Last Reviewed By": "albanD", - "Label": "basics", - "Type": "page" - }, - { - "Path": "beginner/deep_learning_60min_blitz", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "albanD", - "Label": "blitz, landing_page", - "Type": "page" - }, - { - "Path": "intermediate/torchvision_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "albanD", - "Label": "torchvision", - "Type": "page" - }, - { - "Path": "beginner/data_loading_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "albanD", - "Label": "save_load", - "Type": "page" - }, - { - "Path": "beginner/basics/autogradqs_tutorial", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Issue": "https://github.com/pytorch/tutorials/issues/3119", - "Last Reviewed By": "albanD", - "Label": "basics", - "Type": "page" - }, - { - "Path": "recipes/recipes/profiler_recipe", - "Last Verified": "", - "Status": "Needs Update", - "Issue": "https://github.com/pytorch/tutorials/issues/3112", - "Last Reviewed By": "albanD", - "Label": "profiler", - "Type": "page" - }, - { - "Path": "intermediate/dynamic_quantization_bert_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "HDCharles", - "Label": "quantization", - "Type": "page" - }, - { - "Path": "advanced/dynamic_quantization_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "HDCharles", - "Label": "quantization", - "Type": "page" - }, - { - "Path": "prototype/fx_graph_mode_ptq_static", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "HDCharles", - "Label": "fx", - "Type": "page" - }, - { - "Path": "prototype/gpu_quantization_torchao_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "HDCharles", - "Label": "quantization", - "Type": "page" - }, - { - "Path": "intermediate/ddp_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "c-p-i-o", - "Label": "distributed_ddp", - "Type": "page" - }, - { - "Path": "intermediate/FSDP_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "c-p-i-o", - "Label": "distributed_fsdp", - "Type": "page" - }, - { - "Path": "intermediate/dist_tuto", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "c-p-i-o", - "Label": "distributed", - "Type": "page" - }, - { - "Path": "beginner/ddp_series_multigpu", - "Last Verified": "", - "Status": "Needs Update", - "Issue": "https://github.com/pytorch/pytorch/issues/138833", - "Last Reviewed By": "c-p-i-o", - "Label": "distributed_ddp", - "Type": "page" - }, - { - "Path": "intermediate/FSDP_advanced_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "c-p-i-o", - "Label": "distributed_fsdp", - "Type": "page" - }, - { - "Path": "recipes/distributed_comm_debug_mode", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "c-p-i-o", - "Label": "distributed", - "Type": "page" - }, - { - "Path": "beginner/dist_overview", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "wz337", - "Label": "landing_page", - "Type": "page" - }, - { - "Path": "distributed/home", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "wz337", - "Label": "landing_page", - "Type": "page" - }, - { - "Path": "intermediate/TP_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "wz337", - "Label": "distributed", - "Type": "page" - }, - { - "Path": "recipes/distributed_device_mesh", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "wz337", - "Label": "distributed", - "Type": "page" - }, - { - "Path": "intermediate/pipeline_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "wz337", - "Label": "distributed", - "Type": "redirect" - }, - { - "Path": "intermediate/process_group_cpp_extension_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "wz337", - "Label": "distributed", - "Type": "page" - }, - { - "Path": "advanced/generic_join", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "wz337", - "Label": "distributed", - "Type": "page" - }, - { - "Path": "intermediate/dist_pipeline_parallel_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "wz337", - "Label": "distributed", - "Type": "redirect" - }, - { - "Path": "intermediate/pipelining_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "wz337", - "Label": "distributed", - "Type": "page" - }, - { - "Path": "intermediate/TCPStore_libuv_backend", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "wz337", - "Label": "backend", - "Type": "page" - }, - { - "Path": "beginner/basics/intro", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "janeyx99", - "Label": "basics, landing_page", - "Type": "page" - }, - { - "Path": "beginner/basics/tensorqs_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "janeyx99", - "Label": "basics", - "Type": "page" - }, - { - "Path": "beginner/basics/optimization_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "janeyx99", - "Label": "optimization", - "Type": "page" - }, - { - "Path": "beginner/blitz/tensor_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "janeyx99", - "Label": "blitz", - "Type": "page" - }, - { - "Path": "intermediate/tensorboard_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "janeyx99", - "Label": "tensoboard", - "Type": "page" - }, - { - "Path": "recipes/recipes/tensorboard_with_pytorch", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "janeyx99", - "Label": "tensoboard", - "Type": "page" - }, - { - "Path": "advanced/cpp_extension", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "janeyx99", - "Label": "custom_ops", - "Type": "page" - }, - { - "Path": "advanced/cpp_export", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "janeyx99", - "Label": "torchscript", - "Type": "page" - }, - { - "Path": "intermediate/tensorboard_profiler_tutorial", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "janeyx99", - "Label": "tensoboard", - "Type": "redirect" - }, - { - "Path": "beginner/former_torchies/parallelism_tutorial", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "janeyx99", - "Label": "former_torchies", - "Type": "redirect" - }, - { - "Path": "beginner/ptcheat", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "janeyx99", - "Label": "core", - "Type": "page" - }, - { - "Path": "intermediate/optimizer_step_in_backward_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "janeyx99", - "Label": "optimization", - "Type": "page" - }, - { - "Path": "advanced/static_quantization_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "Jerry", - "Label": "quantization", - "Type": "page" - }, - { - "Path": "prototype/fx_graph_mode_quant_guide", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "Jerry", - "Label": "fx", - "Type": "page" - }, - { - "Path": "prototype/pt2e_quant_qat", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "Jerry", - "Label": "quantization", - "Type": "page" - }, - { - "Path": "prototype/pt2e_quant_ptq", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "Jerry", - "Label": "quantization", - "Type": "page" - }, - { - "Path": "prototype/pt2e_quantizer", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "Jerry", - "Label": "quantization", - "Type": "page" - }, - { - "Path": "prototype/quantization_in_pytorch_2_0_export_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "Jerry", - "Label": "quantization", - "Type": "redirect" - }, - { - "Path": "prototype/pt2e_quant_ptq_x86_inductor", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "Jerry", - "Label": "quantization", - "Type": "redirect" - }, - { - "Path": "prototype/pt2e_quant_x86_inductor", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "Jerry", - "Label": "quantization, inductor", - "Type": "page" - }, - { - "Path": "prototype/fx_graph_mode_ptq_dynamic", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "Jerry", - "Label": "fx", - "Type": "page" - }, - { - "Path": "beginner/basics/quickstart_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "jbschlosser", - "Label": "basics", - "Type": "page" - }, - { - "Path": "beginner/blitz/cifar10_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "jbschlosser", - "Label": "blitz", - "Type": "page" - }, - { - "Path": "beginner/basics/transforms_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "jbschlosser", - "Label": "basics", - "Type": "page" - }, - { - "Path": "beginner/nlp/sequence_models_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "jbschlosser", - "Label": "lstm", - "Type": "page" - }, - { - "Path": "recipes/recipes/save_load_across_devices", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "jbschlosser", - "Label": "save_load", - "Type": "redirect" - }, - { - "Path": "recipes/loading_data_recipe", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "jbschlosser", - "Label": "save_load", - "Type": "redirect" - }, - { - "Path": "advanced/super_resolution_with_onnxruntime", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "lucylq", - "Label": "onnx", - "Type": "page" - }, - { - "Path": "recipes/recipes/what_is_state_dict", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "lucylq", - "Label": "core", - "Type": "page" - }, - { - "Path": "beginner/onnx/intro_onnx", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "lucylq", - "Label": "onnx, landing_page", - "Type": "page" - }, - { - "Path": "intermediate/torch_export_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Issue": "example 'Bad4' does not error out as expected, example 'Bad2' with non-strict fails, dynamic shapes example \"DynamicShapesExample1(torch.nn.Module):\" has a constraint violation during export, suggested fixes for \"DynamicShapesExample3\" do not work (the suggestions are max=16, min=16 when I run locally, the tutorial is max=16, min=17, though neither exports successfully). Typo in custom op example, def custom_op(input: torch.Tensor) --> def custom_op(x: torch.Tensor), ", - "Last Reviewed By": "lucylq", - "Label": "torch.export", - "Type": "page" - }, - { - "Path": "beginner/pytorch_with_examples", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "larryliu0820", - "Label": "intro, landing_page", - "Type": "page" - }, - { - "Path": "beginner/basics/saveloadrun_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Issue": "Links broken", - "Last Reviewed By": "larryliu0820", - "Label": "save_load", - "Type": "page" - }, - { - "Path": "beginner/introyt", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "larryliu0820", - "Label": "landing_page", - "Type": "redirect" - }, - { - "Path": "beginner/introyt/modelsyt_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Issue": "Transformers tutorial link broken", - "Last Reviewed By": "larryliu0820", - "Label": "introyt", - "Type": "page" - }, - { - "Path": "beginner/introyt/introyt1_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Issue": "Notebook is working", - "Last Reviewed By": "larryliu0820", - "Label": "introyt", - "Type": "page" - }, - { - "Path": "intermediate/reinforcement_q_learning", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "mlazos", - "Label": "torchrl", - "Type": "page" - }, - { - "Path": "beginner/blitz/autograd_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Issue": "Duplicate of https://pytorch.org/tutorials/beginner/basics/autogradqs_tutorial.html - will redirect", - "Last Reviewed By": "mlazos", - "Label": "blitz", - "Type": "page" - }, - { - "Path": "intermediate/torch_compile_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "mlazos", - "Label": "torch.compile", - "Type": "page" - }, - { - "Path": "recipes/recipes/defining_a_neural_network", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "mlazos", - "Label": "core", - "Type": "page" - }, - { - "Path": "recipes/torch_logs", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "mlazos", - "Label": "torch.logs", - "Type": "page" - }, - { - "Path": "beginner/fgsm_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "malfet", - "Label": "core", - "Type": "page" - }, - { - "Path": "intermediate/mario_rl_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "malfet", - "Label": "torchrl", - "Type": "page" - }, - { - "Path": "intermediate/nvfuser_intro_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "malfet", - "Label": "nvfuser", - "Type": "redirect" - }, - { - "Path": "advanced/coding_ddpg", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "malfet", - "Label": "torchrl", - "Type": "page" - }, - { - "Path": "advanced/custom_ops_landing_page", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "zou3519", - "Label": "custom_ops, landing_page", - "Type": "page" - }, - { - "Path": "advanced/torch_script_custom_ops", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "zou3519", - "Label": "custom_ops", - "Type": "page" - }, - { - "Path": "recipes/torch_compile_user_defined_triton_kernel_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "zou3519", - "Label": "torch.compile", - "Type": "page" - }, - { - "Path": "advanced/dispatcher", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "zou3519", - "Label": "custom_ops", - "Type": "page" - }, - { - "Path": "advanced/cpp_custom_ops", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "zou3519", - "Label": "custom_ops", - "Type": "page" - }, - { - "Path": "advanced/python_custom_ops", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "zou3519", - "Label": "custom_ops", - "Type": "page" - }, - { - "Path": "beginner/saving_loading_models", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "Saiteja64", - "Label": "save_load", - "Type": "page" - }, - { - "Path": "recipes/recipes/saving_and_loading_a_general_checkpoint", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "Saiteja64", - "Label": "save_load", - "Type": "redirect" - }, - { - "Path": "recipes/recipes/saving_and_loading_models_for_inference", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "Saiteja64", - "Label": "save_load", - "Type": "redirect" - }, - { - "Path": "recipes/distributed_checkpoint_recipe", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "Saiteja64", - "Label": "dist_checkpoint", - "Type": "page" - }, - { - "Path": "recipes/distributed_async_checkpoint_recipe", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "Saiteja64", - "Label": "dist_checkpoint", - "Type": "page" - }, - { - "Path": "intermediate/inductor_debug_cpu", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "masnesral", - "Label": "torch.compile", - "Type": "page" - }, - { - "Path": "recipes/compiling_optimizer", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "masnesral", - "Label": "torch.compile", - "Type": "page" - }, - { - "Path": "prototype/inductor_cpp_wrapper_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "masnesral", - "Label": "torch.compile", - "Type": "page" - }, - { - "Path": "recipes/torch_compile_backend_ipex", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "masnesral", - "Label": "torch.compile", - "Type": "page" - }, - { - "Path": "recipes/torch_compile_caching_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "masnesral", - "Label": "torch.compile", - "Type": "page" - }, - { - "Path": "recipes/compiling_optimizer_lr_scheduler", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "masnesral", - "Label": "torch.compile", - "Type": "page" - }, - { - "Path": "recipes/mobile_interpreter", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "byjlw", - "Label": "mobile", - "Type": "redirect" - }, - { - "Path": "beginner/introyt/trainingyt", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "svekars", - "Label": "core", - "Type": "page" - }, - { - "Path": "beginner/dcgan_faces_tutorial", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "svekars", - "Label": "core", - "Type": "page" - }, - { - "Path": "beginner/blitz/neural_networks_tutorial", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "svekars", - "Label": "blitz", - "Type": "page" - }, - { - "Path": "beginner/transformer_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Issue": "redirect", - "Last Reviewed By": "svekars", - "Label": "core", - "Type": "redirect" - }, - { - "Path": "intermediate/seq2seq_translation_tutorial", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "svekars", - "Label": "nlp", - "Type": "page" - }, - { - "Path": "beginner/introyt/tensors_deeper_tutorial", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "svekars", - "Label": "core", - "Type": "page" - }, - { - "Path": "beginner/nn_tutorial", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "svekars", - "Label": "core", - "Type": "page" - }, - { - "Path": "beginner/text_sentiment_ngrams_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "torchtext", - "Type": "redirect" - }, - { - "Path": "beginner/translation_transformer", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "torchtext", - "Type": "redirect" - }, - { - "Path": "beginner/Intro_to_TorchScript_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "torchscript", - "Type": "page" - }, - { - "Path": "beginner/bettertransformer_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "bettertransformer", - "Type": "redirect" - }, - { - "Path": "beginner/torchtext_custom_dataset_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "torchtext", - "Type": "page" - }, - { - "Path": "prototype/prototype_index", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "landing_page", - "Type": "page" - }, - { - "Path": "beginner/audio_io_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "audio", - "Type": "redirect" - }, - { - "Path": "beginner/examples_nn/polynomial_module", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "svekars", - "Label": "examples", - "Type": "page" - }, - { - "Path": "beginner/nlp/pytorch_tutorial", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "svekars", - "Label": "nlp", - "Type": "page" - }, - { - "Path": "beginner/examples_tensor/polynomial_tensor", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "svekars", - "Label": "examples", - "Type": "page" - }, - { - "Path": "beginner/examples_autograd/polynomial_autograd", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "svekars", - "Label": "examples", - "Type": "page" - }, - { - "Path": "recipes/recipes/warmstarting_model_using_parameters_from_a_different_model", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "svekars", - "Label": "core", - "Type": "page" - }, - { - "Path": "prototype/vulkan_workflow", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Issue": "No more OSS development, Executorch is the new thing: https://pytorch.org/executorch/stable/native-delegates-executorch-vulkan-delegate.html", - "Last Reviewed By": "SekyondaMeta", - "Label": "mobile", - "Type": "redirect" - }, - { - "Path": "prototype/ios_gpu_workflow", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "byjlw", - "Label": "mobile", - "Type": "redirect" - }, - { - "Path": "recipes/mobile_perf", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "byjlw", - "Label": "mobile", - "Type": "redirect" - }, - { - "Path": "recipes/inference_tuning_on_aws_graviton", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "graviton", - "Type": "page" - }, - { - "Path": "beginner/t5_tutorial", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "svekars", - "Label": "torchtext", - "Type": "page" - }, - { - "Path": "prototype/nnapi_mobilenetv2", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "byjlw", - "Label": "mobile", - "Type": "redirect" - }, - { - "Path": "recipes/cuda_rpc", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "distributed_rpc", - "Type": "redirect" - }, - { - "Path": "recipes/model_preparation_ios", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "byjlw", - "Label": "mobile", - "Type": "redirect" - }, - { - "Path": "prototype/graph_mode_dynamic_bert_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "core", - "Type": "redirect" - }, - { - "Path": "recipes/ptmobile_recipes_summary", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "byjlw", - "Label": "mobile", - "Type": "redirect" - }, - { - "Path": "beginner/examples_tensor/two_layer_net_tensor", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Last Reviewed By": "svekars", - "Label": "examples", - "Type": "page" - }, - { - "Path": "recipes/distributed_rpc_profiling", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Issue": "redirect", - "Last Reviewed By": "svekars", - "Label": "distrbuted_rpc", - "Type": "redirect" - }, - { - "Path": "beginner/former_torchies/autograd_tutorial_old", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "svekars", - "Label": "former_torchies", - "Type": "redirect" - }, - { - "Path": "beginner/blitz/index", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "landing_page", - "Type": "page" - }, - { - "Path": "beginner/examples_tensor/two_layer_net_numpy", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "svekars", - "Label": "examples", - "Type": "redirect" - }, - { - "Path": "beginner/examples_autograd/two_layer_net_autograd", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "svekars", - "Label": "examples, autograd", - "Type": "redirect" - }, - { - "Path": "beginner/onnx/index", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "onnx, landing_page", - "Type": "page" - }, - { - "Path": "recipes/recipes/index", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Issue": "need to exclude from the build", - "Last Reviewed By": "svekars", - "Label": "landing_page", - "Type": "page" - }, - { - "Path": "beginner/hybrid_frontend_tutorial", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Issue": "Is this a better tutorial: https://github.com/pytorch/tutorials/blob/main/beginner_source/hybrid_frontend/learning_hybrid_frontend_through_example_tutorial.py ?", - "Last Reviewed By": "svekars", - "Label": "landing_page", - "Type": "page" - }, - { - "Path": "recipes/loading_data_recipe", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Issue": "Redirect", - "Last Reviewed By": "svekars", - "Label": "save_load", - "Type": "redirect" - }, - { - "Path": "beginner/transfer_learning_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "beginner/onnx/export_simple_model_to_onnx_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "tugsbayasgalan", - "Label": "onnx", - "Type": "page" - }, - { - "Path": "recipes/recipes/tuning_guide", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "beginner/hyperparameter_tuning_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "intermediate/char_rnn_classification_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "beginner/introyt/autogradyt_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core, autograd", - "Type": "page" - }, - { - "Path": "intermediate/pruning_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "recipes/recipes/amp_recipe", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "malfet", - "Label": "cuda", - "Type": "page" - }, - { - "Path": "intermediate/reinforcement_ppo", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "torchrl", - "Type": "page" - }, - { - "Path": "intermediate/model_parallel_tutorial", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Issue": "https://github.com/pytorch/tutorials/issues/3117", - "Last Reviewed By": "wz337", - "Label": "distributed", - "Type": "redirect" - }, - { - "Path": "beginner/knowledge_distillation_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "beginner/blitz/data_parallel_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "blitz", - "Type": "page" - }, - { - "Path": "advanced/cpp_frontend", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "cpp", - "Type": "page" - }, - { - "Path": "intermediate/scaled_dot_product_attention_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "torch.func", - "Type": "page" - }, - { - "Path": "intermediate/realtime_rpi", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core, ecosystem", - "Type": "page" - }, - { - "Path": "intermediate/ddp_series_multinode", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "distributed_ddp", - "Type": "page" - }, - { - "Path": "beginner/profiler", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "kit1980", - "Label": "profiler", - "Type": "page" - }, - { - "Path": "beginner/nlp/word_embeddings_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "nlp", - "Type": "page" - }, - { - "Path": "beginner/introyt/captumyt", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "captum", - "Type": "page" - }, - { - "Path": "beginner/introyt/tensorboardyt_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "introyt", - "Type": "page" - }, - { - "Path": "intermediate/spatial_transformer_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "beginner/ddp_series_theory", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "distributed_ddp", - "Type": "page" - }, - { - "Path": "recipes/recipes/benchmark", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "benchmark", - "Type": "page" - }, - { - "Path": "beginner/ddp_series_intro", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Issue": "https://github.com/pytorch/tutorials/issues/3116", - "Last Reviewed By": "wz337", - "Label": "distributed_ddp", - "Type": "page" - }, - { - "Path": "intermediate/flask_rest_api_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "flask", - "Type": "page" - }, - { - "Path": "beginner/chatbot_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "intermediate/char_rnn_generation_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "nlp", - "Type": "page" - }, - { - "Path": "beginner/vt_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "deit", - "Type": "page" - }, - { - "Path": "recipes/recipes/zeroing_out_gradients", - "Last Verified": "2024-11-05", - "Status": "Needs Update", - "Issue": "Why tutorial on a tiny one-line step during training?", - "Last Reviewed By": "kit1980", - "Label": "core", - "Type": "page" - }, - { - "Path": "advanced/neural_style_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core, neural_transfer", - "Type": "page" - }, - { - "Path": "beginner/nlp/deep_learning_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core, deep_learning", - "Type": "page" - }, - { - "Path": "recipes/recipes/dynamic_quantization", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "quantization", - "Type": "page" - }, - { - "Path": "intermediate/memory_format_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "memory_format", - "Type": "page" - }, - { - "Path": "recipes/quantization", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "quantization", - "Type": "page" - }, - { - "Path": "beginner/nlp/advanced_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "nlp", - "Type": "page" - }, - { - "Path": "beginner/ddp_series_fault_tolerance", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "distributed_torchrun", - "Type": "page" - }, - { - "Path": "beginner/examples_autograd/two_layer_net_custom_function", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "examples, autograd", - "Type": "page" - }, - { - "Path": "beginner/former_torchies/nnft_tutorial", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "", - "Label": "former_torchies", - "Type": "redirect" - }, - { - "Path": "intermediate/torchrec_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "torchrec", - "Type": "redirect" - }, - { - "Path": "beginner/examples_tensor/polynomial_numpy", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "examples", - "Type": "page" - }, - { - "Path": "intermediate/ensembling", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "vmap", - "Type": "page" - }, - { - "Path": "intermediate/tiatoolbox_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "WSI, ecosystem", - "Type": "page" - }, - { - "Path": "intermediate/parametrizations", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "beginner/examples_nn/two_layer_net_module", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "examples", - "Type": "page" - }, - { - "Path": "beginner/flava_finetuning_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "flava", - "Type": "page" - }, - { - "Path": "beginner/finetuning_torchvision_models_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "vision", - "Type": "redirect" - }, - { - "Path": "beginner/deeplabv3_on_ios", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "byjlw", - "Label": "mobile", - "Type": "redirect" - }, - { - "Path": "advanced/pendulum", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "torchrl", - "Type": "page" - }, - { - "Path": "intermediate/quantized_transfer_learning_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "quantization", - "Type": "page" - }, - { - "Path": "intermediate/custom_function_conv_bn_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "intermediate/rpc_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Issue": "https://github.com/pytorch/tutorials/issues/3118", - "Last Reviewed By": "", - "Label": "distributed_rpc", - "Type": "page" - }, - { - "Path": "recipes/recipes/module_load_state_dict_tips", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "save_load", - "Type": "page" - }, - { - "Path": "advanced/ddp_pipeline", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "wz337", - "Label": "distributed_ddp", - "Type": "page" - }, - { - "Path": "recipes/recipes/changing_default_device", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "recipes/recipes/saving_multiple_models_in_one_file", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "save_load", - "Type": "redirect" - }, - { - "Path": "intermediate/ddp_series_minGPT", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "distributed_ddp", - "Type": "page" - }, - { - "Path": "intermediate/forward_ad_usage", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core, autograd", - "Type": "page" - }, - { - "Path": "intermediate/per_sample_grads", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "torch.func", - "Type": "page" - }, - { - "Path": "beginner/deeplabv3_on_android", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "byjlw", - "Label": "mobile", - "Type": "redirect" - }, - { - "Path": "prototype/nestedtensor", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "nestedtensor", - "Type": "page" - }, - { - "Path": "intermediate/custom_function_double_backward_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "recipes/torchscript_inference", - "Last Verified": "2024-11-05", - "Last Reviewed By": "svekars", - "Label": "torchscript", - "Type": "page" - }, - { - "Path": "advanced/privateuseone", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "privateuse1", - "Type": "page" - }, - { - "Path": "recipes/intel_extension_for_pytorch", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "intel", - "Type": "page" - }, - { - "Path": "beginner/examples_autograd/polynomial_custom_function", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "examples", - "Type": "page" - }, - { - "Path": "recipes/fuse", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "quntization", - "Type": "page" - }, - { - "Path": "beginner/hta_intro_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "kit1980", - "Label": "hta_trace", - "Type": "page" - }, - { - "Path": "intermediate/torchserve_with_ipex", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "torchserve", - "Type": "page" - }, - { - "Path": "beginner/examples_nn/polynomial_nn", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "examples", - "Type": "page" - }, - { - "Path": "intermediate/pinmem_nonblock", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "pinmem", - "Type": "page" - }, - { - "Path": "beginner/examples_nn/dynamic_net", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "examples", - "Type": "page" - }, - { - "Path": "intermediate/fx_conv_bn_fuser", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "fx", - "Type": "page" - }, - { - "Path": "advanced/sharding", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "torchrec", - "Type": "page" - }, - { - "Path": "advanced/extend_dispatcher", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "privateuse1", - "Type": "page" - }, - { - "Path": "recipes/script_optimized", - "Last Verified": "2024-11-05", - "Last Reviewed By": "svekars", - "Label": "mobile", - "Type": "redirect" - }, - { - "Path": "intermediate/ax_multiobjective_nas_tutorial", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "ax", - "Type": "page" - }, - { - "Path": "advanced/torch_script_custom_classes", - "Last Verified": "2024-11-05", - "Last Reviewed By": "svekars", - "Label": "torchscript", - "Type": "page" - }, - { - "Path": "intermediate/jacobians_hessians", - "Last Verified": "2024-11-05", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "beginner/onnx/onnx_registry_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "tugsbayasgalan", - "Label": "onnx", - "Type": "page" - }, - { - "Path": "recipes/zero_redundancy_optimizer", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "distributed_ddp", - "Type": "page" - }, - { - "Path": "intermediate/torchserve_with_ipex_2", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "torchserve", - "Type": "page" - }, - { - "Path": "intermediate/speech_recognition_pipeline_tutorial", - "Last Verified": "", - "Status": "Deprecated", - "Last Reviewed By": "", - "Label": "audio", - "Type": "redirect" - }, - { - "Path": "beginner/examples_nn/polynomial_optim", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "examples", - "Type": "page" - }, - { - "Path": "recipes/recipes/Captum_Recipe", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "captum", - "Type": "page" - }, - { - "Path": "prototype/semi_structured_sparse", - "Last Verified": "2024-11-05", - "Status": "Duplicate", - "Last Reviewed By": "", - "Label": "sparsity", - "Type": "page" - }, - { - "Path": "advanced/cpp_autograd", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "cpp", - "Type": "page" - }, - { - "Path": "advanced/semi_structured_sparse", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "", - "Label": "sparsity", - "Type": "page" - }, - { - "Path": "intermediate/rpc_param_server_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Issue": "https://github.com/pytorch/tutorials/issues/3118", - "Last Reviewed By": "", - "Label": "distributed_rpc", - "Type": "page" - }, - { - "Path": "advanced/torch-script-parallelism", - "Last Verified": "2024-11-05", - "Last Reviewed By": "svekars", - "Label": "torchscript", - "Type": "page" - }, - { - "Path": "beginner/audio_resampling_tutorial", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "", - "Label": "audio", - "Type": "redirect" - }, - { - "Path": "beginner/deploy_seq2seq_hybrid_frontend_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "torchscript", - "Type": "page" - }, - { - "Path": "intermediate/fx_profiling_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "fx", - "Type": "page" - }, - { - "Path": "beginner/audio_feature_extractions_tutorial", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "", - "Label": "audio", - "Type": "redirect" - }, - { - "Path": "recipes/android_native_app_with_custom_op", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "byjlw", - "Label": "mobile", - "Type": "redirect" - }, - { - "Path": "intermediate/text_to_speech_with_torchaudio", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "", - "Label": "audio", - "Type": "redirect" - }, - { - "Path": "recipes/torchserve_vertexai_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "torchserve", - "Type": "page" - }, - { - "Path": "beginner/audio_data_augmentation_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "", - "Label": "audio", - "Type": "redirect" - }, - { - "Path": "intermediate/autograd_saved_tensors_hooks_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "intermediate/rpc_async_execution", - "Last Verified": "", - "Status": "Not Verified", - "Issue": "https://github.com/pytorch/tutorials/issues/3118", - "Last Reviewed By": "", - "Label": "distributed_rpc", - "Type": "page" - }, - { - "Path": "intermediate/forced_alignment_with_torchaudio_tutorial", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "", - "Label": "audio", - "Type": "redirect" - }, - { - "Path": "beginner/nlp/index", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "landing_page", - "Type": "page" - }, - { - "Path": "advanced/rpc_ddp_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Issue": "https://github.com/pytorch/tutorials/issues/3118", - "Last Reviewed By": "", - "Label": "distributed", - "Type": "page" - }, - { - "Path": "recipes/deployment_with_flask", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "advanced/ONNXLive", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "", - "Label": "onnx", - "Type": "redirect" - }, - { - "Path": "beginner/audio_datasets_tutorial", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "", - "Label": "audio", - "Type": "redirect" - }, - { - "Path": "intermediate/compiled_autograd_tutorial", - "Last Verified": "2024-10-09", - "Status": "Verified", - "Last Reviewed By": "fegin", - "Label": "compiled_autograd", - "Type": "page" - }, - { - "Path": "recipes/regional_compilation", - "Last Verified": "2024-10-10", - "Status": "Verified", - "Last Reviewed By": "oulgen", - "Label": "torch_compile", - "Type": "page" - }, - { - "Path": "intermediate/torchrec_intro_tutorial", - "Last Verified": "2024-10-02", - "Status": "Verified", - "Last Reviewed By": "iamzainhuda", - "Label": "torchrec", - "Type": "page" - }, - { - "Path": "prototype/flight_recorder_tutorial", - "Last Verified": "2024-09-09", - "Status": "Verified", - "Last Reviewed By": "fduwjj", - "Label": "distributed", - "Type": "page" - }, - { - "Path": "prototype/inductor_windows_cpu", - "Last Verified": "2024-10-01", - "Status": "Verified", - "Last Reviewed By": "agunapal", - "Label": "inductor", - "Type": "page" - }, - { - "Path": "prototype/max_autotune_on_CPU_tutorial", - "Last Verified": "2024-10-10", - "Status": "Verified", - "Last Reviewed By": "jgong5", - "Label": "inductor", - "Type": "page" - }, - { - "Path": "prototype/python_extension_autoload", - "Last Verified": "2024-10-10", - "Status": "Verified", - "Last Reviewed By": "jgong5", - "Label": "backend, intel", - "Type": "page" - }, - { - "Path": "prototype/vmap_recipe", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "vmap", - "Type": "page" - }, - { - "Path": "beginner/hta_trace_diff_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "hta_trace", - "Type": "page" - }, - { - "Path": "intermediate/neural_tangent_kernels", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "torch.func", - "Type": "page" - }, - { - "Path": "prototype/skip_param_init", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "advanced/numpy_extensions_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "core", - "Type": "page" - }, - { - "Path": "recipes/amx", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "intel.amx", - "Type": "page" - }, - { - "Path": "advanced/usb_semisup_learn", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "semisupervised_learning, ecosystem", - "Type": "page" - }, - { - "Path": "recipes/model_preparation_android", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "byjlw", - "Label": "mobile", - "Type": "redirect" - }, - { - "Path": "recipes/recipes/timer_quick_start", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "benchmark", - "Type": "page" - }, - { - "Path": "prototype/numeric_suite_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "quantization", - "Type": "page" - }, - { - "Path": "recipes/recipes/swap_tensors", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "save_load", - "Type": "page" - }, - { - "Path": "prototype/torchscript_freezing", - "Last Verified": "2024-11-05", - "Last Reviewed By": "svekars", - "Label": "torchscript", - "Type": "page" - }, - { - "Path": "beginner/audio_feature_augmentation_tutorial", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "", - "Label": "audio", - "Type": "redirect" - }, - { - "Path": "recipes/intel_neural_compressor_for_pytorch", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "intel.quantization", - "Type": "page" - }, - { - "Path": "recipes/recipes/reasoning_about_shapes", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "intro", - "Type": "page" - }, - { - "Path": "beginner/examples_nn/two_layer_net_optim", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "examples", - "Type": "page" - }, - { - "Path": "intermediate/dqn_with_rnn_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "torchrl", - "Type": "page" - }, - { - "Path": "beginner/former_torchies_tutorial", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "", - "Label": "former_torchies", - "Type": "redirect" - }, - { - "Path": "prototype/ios_coreml_workflow", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "byjlw", - "Label": "mobile", - "Type": "redirect" - }, - { - "Path": "recipes/profile_with_itt", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "intel.xpu", - "Type": "page" - }, - { - "Path": "intermediate/torch_export_nightly_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "", - "Label": "torch.export", - "Type": "page" - }, - { - "Path": "prototype/backend_config_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "torchao", - "Type": "page" - }, - { - "Path": "recipes/distributed_optim_torchscript", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "torchscript", - "Type": "page" - }, - { - "Path": "beginner/examples_nn/two_layer_net_nn", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "intro", - "Type": "page" - }, - { - "Path": "prototype/maskedtensor_overview", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "maskedtensor", - "Type": "page" - }, - { - "Path": "beginner/template_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "template", - "Type": "template" - }, - { - "Path": "beginner/former_torchies/tensor_tutorial_old", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "", - "Label": "former_torchies", - "Type": "redirect" - }, - { - "Path": "recipes/bundled_inputs", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "Jacob Szwejbka", - "Label": "mobile", - "Type": "page" - }, - { - "Path": "prototype/maskedtensor_sparsity", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "maskedtensor", - "Type": "page" - }, - { - "Path": "prototype/tracing_based_selective_build", - "Last Verified": "2024-11-05", - "Status": "Deprecated", - "Last Reviewed By": "", - "Label": "mobile", - "Type": "redirect" - }, - { - "Path": "prototype/maskedtensor_advanced_semantics", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "maskedtensor", - "Type": "page" - }, - { - "Path": "advanced/cpp_cuda_graphs", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "cuda", - "Type": "redirect" - }, - { - "Path": "beginner/hybrid_frontend/learning_hybrid_frontend_through_example_tutorial", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "hybrid_frontend", - "Type": "page" - }, - { - "Path": "prototype/maskedtensor_adagrad", - "Last Verified": "", - "Status": "Not Verified", - "Last Reviewed By": "", - "Label": "maskedtensor", - "Type": "page" - }, - { - "Path": "recipes/torch_export_aoti_python", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "", - "Label": "torch.export", - "Type": "page" - }, - { - "Path": "recipes/xeon_run_cpu", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "", - "Label": "xeon", - "Type": "page" - }, - { - "Path": "prototype/distributed_rpc_profiling", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "", - "Label": "rpc", - "Type": "redirect" - }, - { - "Path": "./index", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "landing_page", - "Type": "page" - }, - { - "Path": "beginner/introyt/introyt_index", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "svekars", - "Label": "landing_page", - "Type": "page" - }, - { - "Path": "intermediate/FSDP_advanced_tutorial", - "Last Verified": "2024-11-05", - "Status": "Verified", - "Last Reviewed By": "c-p-i-o", - "Label": "distributed", - "Type": "page" - } -] From 6abb5588822a0874912f5f2738d6e6ac469aeafa Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Mon, 25 Nov 2024 16:04:13 -0800 Subject: [PATCH 05/17] Update --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 356ad1130a6..0cd02d990e0 100644 --- a/Makefile +++ b/Makefile @@ -87,8 +87,9 @@ download: unzip -o $(DATADIR)/PennFudanPed.zip -d intermediate_source/data/ download-last-reviewed-json: + @echo "Downloading tutorials-review-data.json..." curl -o tutorials-review-data.json https://raw.githubusercontent.com/pytorch/tutorials/refs/heads/last-reviewed-data-json/tutorials-review-data.json - + @echo "Finished downloading tutorials-review-data.json." docs: make download make download-last-reviewed-json From 570cba96b11bb6f793b0ce941ba833b09bdb3128 Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Tue, 26 Nov 2024 09:44:44 -0800 Subject: [PATCH 06/17] Mount the .git dir in the Docker container --- .github/workflows/build-tutorials.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-tutorials.yml b/.github/workflows/build-tutorials.yml index ffee49f4a76..20baefaf77b 100644 --- a/.github/workflows/build-tutorials.yml +++ b/.github/workflows/build-tutorials.yml @@ -89,6 +89,7 @@ jobs: --shm-size=2gb \ --name="${container_name}" \ -v "${GITHUB_WORKSPACE}:/var/lib/workspace" \ + -v "${GITHUB_WORKSPACE}/.git:/var/lib/workspace/.git" \ # Mount the .git directory -w /var/lib/workspace \ "${DOCKER_IMAGE}" ) From c6f8bff91759ad49d628c4606b7783437a539336 Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Tue, 26 Nov 2024 10:45:31 -0800 Subject: [PATCH 07/17] Update --- .github/workflows/build-tutorials.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-tutorials.yml b/.github/workflows/build-tutorials.yml index 20baefaf77b..2b4fb9e4366 100644 --- a/.github/workflows/build-tutorials.yml +++ b/.github/workflows/build-tutorials.yml @@ -89,7 +89,7 @@ jobs: --shm-size=2gb \ --name="${container_name}" \ -v "${GITHUB_WORKSPACE}:/var/lib/workspace" \ - -v "${GITHUB_WORKSPACE}/.git:/var/lib/workspace/.git" \ # Mount the .git directory + -v "${GITHUB_WORKSPACE}/.git:/var/lib/workspace/.git" \ -w /var/lib/workspace \ "${DOCKER_IMAGE}" ) From ff33d1fcb1ccedffa8fc3a05334659a90d26966b Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Tue, 26 Nov 2024 12:51:52 -0800 Subject: [PATCH 08/17] Set fetch-depth: 0 --- .github/workflows/build-tutorials.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-tutorials.yml b/.github/workflows/build-tutorials.yml index 2b4fb9e4366..c65500104ba 100644 --- a/.github/workflows/build-tutorials.yml +++ b/.github/workflows/build-tutorials.yml @@ -44,6 +44,8 @@ jobs: - name: Checkout Tutorials uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Setup Linux uses: pytorch/pytorch/.github/actions/setup-linux@main @@ -116,6 +118,8 @@ jobs: - name: Checkout Tutorials uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Setup Linux uses: pytorch/pytorch/.github/actions/setup-linux@main From bdc6f6f7b7f9136c21be9ac95a96da4305474711 Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Tue, 26 Nov 2024 16:15:45 -0800 Subject: [PATCH 09/17] Remove mounting .git dir in the container --- .github/workflows/build-tutorials.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-tutorials.yml b/.github/workflows/build-tutorials.yml index c65500104ba..58c515b325f 100644 --- a/.github/workflows/build-tutorials.yml +++ b/.github/workflows/build-tutorials.yml @@ -91,7 +91,6 @@ jobs: --shm-size=2gb \ --name="${container_name}" \ -v "${GITHUB_WORKSPACE}:/var/lib/workspace" \ - -v "${GITHUB_WORKSPACE}/.git:/var/lib/workspace/.git" \ -w /var/lib/workspace \ "${DOCKER_IMAGE}" ) From 960efa385d978dc3a782abec174a1b548612ec6b Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Mon, 2 Dec 2024 09:45:04 -0800 Subject: [PATCH 10/17] Address feedback --- beginner_source/deep_learning_nlp_tutorial.rst | 12 ------------ beginner_source/t5_tutorial.rst | 2 -- 2 files changed, 14 deletions(-) delete mode 100644 beginner_source/deep_learning_nlp_tutorial.rst diff --git a/beginner_source/deep_learning_nlp_tutorial.rst b/beginner_source/deep_learning_nlp_tutorial.rst deleted file mode 100644 index 23e0fff5606..00000000000 --- a/beginner_source/deep_learning_nlp_tutorial.rst +++ /dev/null @@ -1,12 +0,0 @@ -:orphan: - -Deep Learning for NLP with Pytorch -=================================== - -This tutorial has been deprecated. - -Redirecting to a newer tutorial in 3 seconds... - -.. raw:: html - - diff --git a/beginner_source/t5_tutorial.rst b/beginner_source/t5_tutorial.rst index c1f8af13a71..65de42b9320 100644 --- a/beginner_source/t5_tutorial.rst +++ b/beginner_source/t5_tutorial.rst @@ -1,5 +1,3 @@ -:orphan: - T5-Base Model for Summarization, Sentiment Classification, and Translation ========================================================================== From dc429ef6ebb780e108e6976d2b3cbf255a2087ab Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Mon, 2 Dec 2024 10:21:20 -0800 Subject: [PATCH 11/17] Update --- beginner_source/{t5_tutorial.rst => t5_tutoria.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename beginner_source/{t5_tutorial.rst => t5_tutoria.rst} (100%) diff --git a/beginner_source/t5_tutorial.rst b/beginner_source/t5_tutoria.rst similarity index 100% rename from beginner_source/t5_tutorial.rst rename to beginner_source/t5_tutoria.rst From 137f995508327c5d45b503a844764ca853da2ac5 Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Mon, 2 Dec 2024 10:21:59 -0800 Subject: [PATCH 12/17] Update --- intermediate_source/pipeline_tutorial.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/intermediate_source/pipeline_tutorial.rst b/intermediate_source/pipeline_tutorial.rst index ade3c9b0aa4..06f10a4a884 100644 --- a/intermediate_source/pipeline_tutorial.rst +++ b/intermediate_source/pipeline_tutorial.rst @@ -1,5 +1,3 @@ -:orphan: - Training Transformer models using Pipeline Parallelism ====================================================== From f21b5c00f15dcd91e3b8e2d314c7394178fa1018 Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Mon, 2 Dec 2024 12:11:23 -0800 Subject: [PATCH 13/17] Address feedback --- .../insert_last_verified.py | 51 ++++++------------- Makefile | 4 +- 2 files changed, 18 insertions(+), 37 deletions(-) rename insert_last_verified.py => .jenkins/insert_last_verified.py (82%) diff --git a/insert_last_verified.py b/.jenkins/insert_last_verified.py similarity index 82% rename from insert_last_verified.py rename to .jenkins/insert_last_verified.py index 7f3e4bbbfdf..b7444953a30 100644 --- a/insert_last_verified.py +++ b/.jenkins/insert_last_verified.py @@ -7,9 +7,10 @@ from bs4 import BeautifulSoup # Check if the build directory is provided as an argument in the Makefile -if len(sys.argv) < 2: - print("Error: Build directory not provided. Exiting.") - exit(1) +def main(): + if len(sys.argv) < 2: + print("Error: Build directory not provided. Exiting.") + exit(1) build_dir = sys.argv[1] print(f"Build directory: {build_dir}") @@ -39,48 +40,25 @@ "": "", # root dir for index.rst } - -# Use git log to get the creation date of the file -def get_creation_date(file_path): +def get_git_log_date(file_path, git_log_args): try: result = subprocess.run( - ["git", "log", "--diff-filter=A", "--format=%aD", "--", file_path], + ["git", "log"] + git_log_args + ["--", file_path], capture_output=True, text=True, check=True, ) if result.stdout: - creation_date = result.stdout.splitlines()[0] - creation_date = datetime.strptime(creation_date, "%a, %d %b %Y %H:%M:%S %z") - formatted_date = creation_date.strftime("%b %d, %Y") - else: - formatted_date = "Unknown" - return formatted_date + date_str = result.stdout.splitlines()[0] + return datetime.strptime(date_str, "%a, %d %b %Y %H:%M:%S %z") except subprocess.CalledProcessError: - return "Unknown" + pass + raise ValueError(f"Could not find date for {file_path}") - -# Use git log to get the last updated date of the file +def get_creation_date(file_path): + return get_git_log_date(file_path, ["--diff-filter=A", "--format=%aD"]).strftime("%b %d, %Y") def get_last_updated_date(file_path): - try: - result = subprocess.run( - ["git", "log", "-1", "--format=%aD", "--", file_path], - capture_output=True, - text=True, - check=True, - ) - if result.stdout: - last_updated_date = result.stdout.strip() - last_updated_date = datetime.strptime( - last_updated_date, "%a, %d %b %Y %H:%M:%S %z" - ) - formatted_date = last_updated_date.strftime("%b %d, %Y") - else: - formatted_date = "Unknown" - return formatted_date - except subprocess.CalledProcessError: - return "Unknown" - + return get_git_log_date(file_path, ["-1", "--format=%aD"]).strftime("%b %d, %Y") # Try to find the source file with the given base path and the extensions .rst and .py def find_source_file(base_path): @@ -178,3 +156,6 @@ def process_json_file(json_file_path): "or `make html` build. Warnings about these files when you run `make html-noplot` " "can be ignored." ) + +if __name__ == "__main__": + main() diff --git a/Makefile b/Makefile index 0cd02d990e0..9068d32b2ab 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ docs: make download make download-last-reviewed-json make html - @python insert_last_verified.py $(BUILDDIR)/html + @python .jenkins/insert_last_verified.py $(BUILDDIR)/html rm -rf docs cp -r $(BUILDDIR)/html docs touch docs/.nojekyll @@ -107,7 +107,7 @@ html-noplot: make download-last-reviewed-json @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." @echo "Running post-processing script to insert 'Last Verified' dates..." - @python insert_last_verified.py $(BUILDDIR)/html + @python .jenkins/insert_last_verified.py $(BUILDDIR)/html rm -rf tutorials-review-data.json clean-cache: From 849873ba6c2a63858d94843ea5dca3d4220dc8b8 Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Mon, 2 Dec 2024 13:53:50 -0800 Subject: [PATCH 14/17] Update --- .jenkins/insert_last_verified.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.jenkins/insert_last_verified.py b/.jenkins/insert_last_verified.py index b7444953a30..4311d51d887 100644 --- a/.jenkins/insert_last_verified.py +++ b/.jenkins/insert_last_verified.py @@ -6,17 +6,11 @@ from bs4 import BeautifulSoup -# Check if the build directory is provided as an argument in the Makefile -def main(): - if len(sys.argv) < 2: - print("Error: Build directory not provided. Exiting.") - exit(1) - build_dir = sys.argv[1] print(f"Build directory: {build_dir}") json_file_path = "tutorials-review-data.json" -build_dir = "_build/html" # for testing after _build/html is created +#build_dir = "_build/html" # for testing after _build/html is created # paths to skip from the post-processing script paths_to_skip = [ @@ -157,5 +151,10 @@ def process_json_file(json_file_path): "can be ignored." ) +def main(): + if len(sys.argv) < 2: + print("Error: Build directory not provided. Exiting.") + exit(1) + if __name__ == "__main__": main() From f8c904786d1ae2e0c907b69601733f173b399a93 Mon Sep 17 00:00:00 2001 From: Nikita Shulga <2453524+malfet@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:17:44 -0800 Subject: [PATCH 15/17] Apply suggestions from code review --- .jenkins/insert_last_verified.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.jenkins/insert_last_verified.py b/.jenkins/insert_last_verified.py index 4311d51d887..e74fe218c45 100644 --- a/.jenkins/insert_last_verified.py +++ b/.jenkins/insert_last_verified.py @@ -6,11 +6,8 @@ from bs4 import BeautifulSoup -build_dir = sys.argv[1] -print(f"Build directory: {build_dir}") json_file_path = "tutorials-review-data.json" -#build_dir = "_build/html" # for testing after _build/html is created # paths to skip from the post-processing script paths_to_skip = [ @@ -143,18 +140,19 @@ def process_json_file(json_file_path): print(f"Warning:

tag not found in {html_file_path}") -process_json_file(json_file_path) -print( - f"Finished processing JSON file. Please check the output for any warnings. " - "Pages like `nlp/index.html` are generated only during the full `make docs` " - "or `make html` build. Warnings about these files when you run `make html-noplot` " - "can be ignored." -) - def main(): if len(sys.argv) < 2: print("Error: Build directory not provided. Exiting.") exit(1) + build_dir = sys.argv[1] + print(f"Build directory: {build_dir}") + process_json_file(json_file_path) + print( + "Finished processing JSON file. Please check the output for any warnings. " + "Pages like `nlp/index.html` are generated only during the full `make docs` " + "or `make html` build. Warnings about these files when you run `make html-noplot` " + "can be ignored." + ) if __name__ == "__main__": main() From b980a2f8b21644665a20d370d59c5f57f073aeed Mon Sep 17 00:00:00 2001 From: Nikita Shulga <2453524+malfet@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:04:49 -0800 Subject: [PATCH 16/17] Update .jenkins/insert_last_verified.py --- .jenkins/insert_last_verified.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.jenkins/insert_last_verified.py b/.jenkins/insert_last_verified.py index e74fe218c45..b201c54f34c 100644 --- a/.jenkins/insert_last_verified.py +++ b/.jenkins/insert_last_verified.py @@ -48,6 +48,8 @@ def get_git_log_date(file_path, git_log_args): def get_creation_date(file_path): return get_git_log_date(file_path, ["--diff-filter=A", "--format=%aD"]).strftime("%b %d, %Y") + + def get_last_updated_date(file_path): return get_git_log_date(file_path, ["-1", "--format=%aD"]).strftime("%b %d, %Y") From dcee5e693c877b68f0e1c659127502069f6ef57b Mon Sep 17 00:00:00 2001 From: Nikita Shulga <2453524+malfet@users.noreply.github.com> Date: Thu, 12 Dec 2024 13:48:36 -0800 Subject: [PATCH 17/17] Apply suggestions from code review --- .jenkins/insert_last_verified.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.jenkins/insert_last_verified.py b/.jenkins/insert_last_verified.py index b201c54f34c..b43ef8de8e8 100644 --- a/.jenkins/insert_last_verified.py +++ b/.jenkins/insert_last_verified.py @@ -63,7 +63,7 @@ def find_source_file(base_path): # Function to process a JSON file and insert the "Last Verified" information into the HTML files -def process_json_file(json_file_path): +def process_json_file(build_dir , json_file_path): with open(json_file_path, "r", encoding="utf-8") as json_file: json_data = json.load(json_file) @@ -148,7 +148,7 @@ def main(): exit(1) build_dir = sys.argv[1] print(f"Build directory: {build_dir}") - process_json_file(json_file_path) + process_json_file(build_dir , json_file_path) print( "Finished processing JSON file. Please check the output for any warnings. " "Pages like `nlp/index.html` are generated only during the full `make docs` "