[torch vitals] Initial implementation#51047
Closed
bwasti wants to merge 1 commit intopytorch:masterfrom
Closed
Conversation
Summary: If the environment variable `TORCH_VITAL` is set to a non-zero length string, the vitals a dumped at program end. The API is very similar to google's logging Test Plan: buck test //caffe2/aten:vitals Reviewed By: bitfort Differential Revision: D25791248 fbshipit-source-id: f46b74ecab915619b973adb3187074b9efa0897e
Contributor
💊 CI failures summary and remediationsAs of commit 945081e (more details on the Dr. CI page):
This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D25791248 |
Codecov Report
@@ Coverage Diff @@
## master #51047 +/- ##
==========================================
- Coverage 80.92% 80.91% -0.01%
==========================================
Files 1926 1928 +2
Lines 210019 210033 +14
==========================================
+ Hits 169950 169953 +3
- Misses 40069 40080 +11 |
Contributor
|
This pull request has been merged in 069602e. |
Closed
malfet
added a commit
that referenced
this pull request
Mar 26, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR #51047 (Jan 2021), with a Python API in #53238 and a CUDA vital in #58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). A search on cs.github.com and general web search confirmed no external projects depend on torch.set_vital, torch.read_vitals, or torch.vitals_enabled — usage was limited to pytorch/pytorch itself. Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> ghstack-source-id: b56228f Pull-Request: #178479
malfet
added a commit
that referenced
this pull request
Mar 26, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR #51047 (Jan 2021), with a Python API in #53238 and a CUDA vital in #58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). A search on cs.github.com and general web search confirmed no external projects depend on torch.set_vital, torch.read_vitals, or torch.vitals_enabled — usage was limited to pytorch/pytorch itself. Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> ghstack-source-id: 372adae Pull-Request: #178479
malfet
added a commit
that referenced
this pull request
Mar 26, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR #51047 (Jan 2021), with a Python API in #53238 and a CUDA vital in #58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). A search on cs.github.com and general web search confirmed no external projects depend on torch.set_vital, torch.read_vitals, or torch.vitals_enabled — usage was limited to pytorch/pytorch itself. Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> ghstack-source-id: 1c33462 Pull-Request: #178479
malfet
added a commit
that referenced
this pull request
Mar 26, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR #51047 (Jan 2021), with a Python API in #53238 and a CUDA vital in #58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). A search on cs.github.com and general web search confirmed no external projects depend on torch.set_vital, torch.read_vitals, or torch.vitals_enabled — usage was limited to pytorch/pytorch itself. Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> ghstack-source-id: 65c136a Pull-Request: #178479
malfet
added a commit
that referenced
this pull request
Mar 26, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR #51047 (Jan 2021), with a Python API in #53238 and a CUDA vital in #58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). A search on cs.github.com and general web search confirmed no external projects depend on torch.set_vital, torch.read_vitals, or torch.vitals_enabled — usage was limited to pytorch/pytorch itself. Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> ghstack-source-id: 160ae2f Pull-Request: #178479
pytorchmergebot
pushed a commit
that referenced
this pull request
Mar 26, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR #51047 (Jan 2021), with a Python API in #53238 and a CUDA vital in #58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). A search on cs.github.com and general web search confirmed no external projects depend on torch.set_vital, torch.read_vitals, or torch.vitals_enabled — usage was limited to pytorch/pytorch itself. Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Pull Request resolved: #178479 Approved by: https://github.com/msaroufim, https://github.com/albanD
Copilot AI
pushed a commit
that referenced
this pull request
Mar 27, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR #51047 (Jan 2021), with a Python API in #53238 and a CUDA vital in #58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). A search on cs.github.com and general web search confirmed no external projects depend on torch.set_vital, torch.read_vitals, or torch.vitals_enabled — usage was limited to pytorch/pytorch itself. Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Pull Request resolved: #178479 Approved by: https://github.com/msaroufim, https://github.com/albanD Co-authored-by: Xia-Weiwen <12522207+Xia-Weiwen@users.noreply.github.com>
AaronWang04
pushed a commit
to AaronWang04/pytorch
that referenced
this pull request
Mar 31, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR pytorch#51047 (Jan 2021), with a Python API in pytorch#53238 and a CUDA vital in pytorch#58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). A search on cs.github.com and general web search confirmed no external projects depend on torch.set_vital, torch.read_vitals, or torch.vitals_enabled — usage was limited to pytorch/pytorch itself. Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Pull Request resolved: pytorch#178479 Approved by: https://github.com/msaroufim, https://github.com/albanD
pytorch-bot Bot
pushed a commit
that referenced
this pull request
Apr 2, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR #51047 (Jan 2021), with a Python API in #53238 and a CUDA vital in #58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). A search on cs.github.com and general web search confirmed no external projects depend on torch.set_vital, torch.read_vitals, or torch.vitals_enabled — usage was limited to pytorch/pytorch itself. Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Pull Request resolved: #178479 Approved by: https://github.com/msaroufim, https://github.com/albanD
malfet
added a commit
that referenced
this pull request
Apr 2, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR #51047 (Jan 2021), with a Python API in #53238 and a CUDA vital in #58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). A search on cs.github.com and general web search confirmed no external projects depend on torch.set_vital, torch.read_vitals, or torch.vitals_enabled — usage was limited to pytorch/pytorch itself. Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> ghstack-source-id: 46b1a3d Pull-Request: #178479
malfet
added a commit
that referenced
this pull request
Apr 2, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR #51047 (Jan 2021), with a Python API in #53238 and a CUDA vital in #58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). A search on cs.github.com and general web search confirmed no external projects depend on torch.set_vital, torch.read_vitals, or torch.vitals_enabled — usage was limited to pytorch/pytorch itself. Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> ghstack-source-id: 46b1a3d Pull-Request: #178479
pytorchmergebot
pushed a commit
that referenced
this pull request
Apr 3, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR #51047 (Jan 2021), with a Python API in #53238 and a CUDA vital in #58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). Update: `torch.set_vital` was used from TorchData (see meta-pytorch/data#1537 ) so will keep the dummy API around Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Pull Request resolved: #178479 Approved by: https://github.com/msaroufim, https://github.com/albanD, https://github.com/mlazos
IvanKobzarev
pushed a commit
to IvanKobzarev/pytorch
that referenced
this pull request
Apr 3, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR pytorch#51047 (Jan 2021), with a Python API in pytorch#53238 and a CUDA vital in pytorch#58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). A search on cs.github.com and general web search confirmed no external projects depend on torch.set_vital, torch.read_vitals, or torch.vitals_enabled — usage was limited to pytorch/pytorch itself. Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Pull Request resolved: pytorch#178479 Approved by: https://github.com/msaroufim, https://github.com/albanD
weifengpy
pushed a commit
that referenced
this pull request
Apr 7, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR #51047 (Jan 2021), with a Python API in #53238 and a CUDA vital in #58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). Update: `torch.set_vital` was used from TorchData (see meta-pytorch/data#1537 ) so will keep the dummy API around Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Pull Request resolved: #178479 Approved by: https://github.com/msaroufim, https://github.com/albanD, https://github.com/mlazos
nklshy-aws
pushed a commit
to nklshy-aws/pytorch
that referenced
this pull request
Apr 7, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR pytorch#51047 (Jan 2021), with a Python API in pytorch#53238 and a CUDA vital in pytorch#58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). A search on cs.github.com and general web search confirmed no external projects depend on torch.set_vital, torch.read_vitals, or torch.vitals_enabled — usage was limited to pytorch/pytorch itself. Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Pull Request resolved: pytorch#178479 Approved by: https://github.com/msaroufim, https://github.com/albanD
nklshy-aws
pushed a commit
to nklshy-aws/pytorch
that referenced
this pull request
Apr 7, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR pytorch#51047 (Jan 2021), with a Python API in pytorch#53238 and a CUDA vital in pytorch#58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). Update: `torch.set_vital` was used from TorchData (see meta-pytorch/data#1537 ) so will keep the dummy API around Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Pull Request resolved: pytorch#178479 Approved by: https://github.com/msaroufim, https://github.com/albanD, https://github.com/mlazos
pytorch-bot Bot
pushed a commit
that referenced
this pull request
Apr 10, 2026
TorchVitals was an undocumented feature gated behind the TORCH_VITAL environment variable that allowed setting and reading key-value "vital signs" (e.g. whether CUDA or DataLoader was used). It was never documented and the test itself had a "FIXME: document or deprecate" comment. Originally added in PR #51047 (Jan 2021), with a Python API in #53238 and a CUDA vital in #58059. There have been no feature changes since June 2021 — all subsequent commits were mechanical cleanups (clang-tidy, thread-safe getenv, etc.). Update: `torch.set_vital` was used from TorchData (see meta-pytorch/data#1537 ) so will keep the dummy API around Authored with Claude. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Pull Request resolved: #178479 Approved by: https://github.com/msaroufim, https://github.com/albanD, https://github.com/mlazos
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
Summary: Pull Request resolved: pytorch#51047 If the environment variable `TORCH_VITAL` is set to a non-zero length string, the vitals a dumped at program end. The API is very similar to google's logging Test Plan: buck test //caffe2/aten:vitals Reviewed By: bitfort Differential Revision: D25791248 fbshipit-source-id: 0b40da7d22c31d2c4b2094f0dcb1229a35338ac2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
If the environment variable
TORCH_VITALis set to a non-zero length string, the vitals a dumped at program end.The API is very similar to google's logging
Test Plan: buck test //caffe2/aten:vitals
Reviewed By: bitfort
Differential Revision: D25791248