pytorch/tools
Zain Rizvi 5ddb8ef827 Make emit_metrics importable without having boto3 installed (#107070)
Make it so that scripts can import and run the `emit_metrics` function even if they don't have boto3 installed, in which case it will still validate the inputs but skip the actual metric emission part.

It's purely a refactor without any real logic changes

Motivation: So that run_test.py and the target determination code can use this library easily without worrying about if it was imported or if it's dependencies are installed.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/107070
Approved by: https://github.com/huydhn
2023-08-21 21:13:01 +00:00
..
alerts Revert "add oncall info individual info to failing alert job alert (#103915)" 2023-06-21 23:06:45 +00:00
amd_build [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
autograd Implement autograd support for sparse compressed tensor constructors (#107384) 2023-08-21 20:26:39 +00:00
bazel_tools
build/bazel Bump certifi from 2023.5.7 to 2023.7.22 in /tools/build/bazel (#105983) 2023-07-27 10:23:56 -07:00
build_defs Back out "[aarch64][tools/build_defs/third_party/fbcode_defs.bzl] Fix dep handling in cross-builds" 2023-05-01 16:27:51 -07:00
code_analyzer [BE]: Update Ruff to 0.0.280 (#105724) 2023-07-22 23:03:34 +00:00
code_coverage [Reland] Update mypy to 1.4.1 (#105227) 2023-07-15 20:30:20 +00:00
config
coverage_plugins_package [BE] Enable ruff's UP rules and autoformat tools and scripts (#105428) 2023-07-19 01:24:44 +00:00
dynamo [dynamo 3.11] enable dynamo unittests in 3.11 (#98104) 2023-04-10 20:04:10 +00:00
gdb [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
github fix upload alerts to rockset (#103995) 2023-06-22 23:33:10 +00:00
iwyu Add torch.float8_e5m2 and torch.float8_e4m3 data types (#104242) 2023-07-20 16:09:11 +00:00
jit [BE] Enable ruff's UP rules and autoformat tools and scripts (#105428) 2023-07-19 01:24:44 +00:00
linter Use ProcessPoolExecutor in the ufmt adapter (#106123) 2023-08-02 16:28:36 +00:00
lite_interpreter [Reland] Update mypy to 1.4.1 (#105227) 2023-07-15 20:30:20 +00:00
lldb
onnx [BE] Enable ruff's UP rules and autoformat tools and scripts (#105428) 2023-07-19 01:24:44 +00:00
pyi [BE]: Update ruff to 0.285 (#107519) 2023-08-20 01:36:18 +00:00
rules
rules_cc
setup_helpers Fix the Requirement of CMake Version (#106254) 2023-08-02 08:02:52 +00:00
shared Test Reordering: Run previously failing tests first (#101123) 2023-05-16 19:57:54 +00:00
stats Make emit_metrics importable without having boto3 installed (#107070) 2023-08-21 21:13:01 +00:00
test Make emit_metrics importable without having boto3 installed (#107070) 2023-08-21 21:13:01 +00:00
testing Make emit_metrics importable without having boto3 installed (#107070) 2023-08-21 21:13:01 +00:00
__init__.py
bazel.bzl update rules_python and let bazel install its own pip dependencies (#101405) 2023-05-23 06:20:33 +00:00
BUCK.bzl Revert "Move functional collectives to the right namespace (#97793)" 2023-03-31 16:02:07 +00:00
BUCK.oss
build_libtorch.py
build_pytorch_libs.py
download_mnist.py [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
extract_scripts.py
gen_flatbuffers.sh
gen_vulkan_spv.py [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
generate_torch_version.py [BE] Enable ruff's UP rules and autoformat tools and scripts (#105428) 2023-07-19 01:24:44 +00:00
generated_dirs.txt
git_add_generated_dirs.sh
git_reset_generated_dirs.sh
nightly.py [BE] Enable ruff's UP rules and autoformat tools and scripts (#105428) 2023-07-19 01:24:44 +00:00
nvcc_fix_deps.py
pytorch.version
README.md
render_junit.py
substitute.py [BE] Enable ruff's UP rules and autoformat tools and scripts (#105428) 2023-07-19 01:24:44 +00:00
update_masked_docs.py
vscode_settings.py

This folder contains a number of scripts which are used as part of the PyTorch build process. This directory also doubles as a Python module hierarchy (thus the __init__.py).

Overview

Modern infrastructure:

  • autograd - Code generation for autograd. This includes definitions of all our derivatives.
  • jit - Code generation for JIT
  • shared - Generic infrastructure that scripts in tools may find useful.
    • module_loader.py - Makes it easier to import arbitrary Python files in a script, without having to add them to the PYTHONPATH first.

Build system pieces:

  • setup_helpers - Helper code for searching for third-party dependencies on the user system.
  • build_pytorch_libs.py - cross-platform script that builds all of the constituent libraries of PyTorch, but not the PyTorch Python extension itself.
  • build_libtorch.py - Script for building libtorch, a standalone C++ library without Python support. This build script is tested in CI.

Developer tools which you might find useful:

Important if you want to run on AMD GPU:

  • amd_build - HIPify scripts, for transpiling CUDA into AMD HIP. Right now, PyTorch and Caffe2 share logic for how to do this transpilation, but have separate entry-points for transpiling either PyTorch or Caffe2 code.
    • build_amd.py - Top-level entry point for HIPifying our codebase.

Tools which are only situationally useful: