-
Notifications
You must be signed in to change notification settings - Fork 514
feat(pytorch): instrument distributed training with pytorch.rank lifetime span #18449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kr-igor
wants to merge
15
commits into
main
Choose a base branch
from
kr-igor/pytorch-rank-span
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
89cc563
feat(pytorch): instrument distributed training with pytorch.rank life…
kr-igor 3d6a375
feat(pytorch): wire optional step signals from Optimizer.step to C tr…
kr-igor 8a682cb
chore: register DD_TRAINING_STEP_PROFILING in supported-configuration…
kr-igor 204cb42
style: ruff format _distributed.py
kr-igor 42ff92a
fix(test): use spec= in _make_fake_lib_no_steps to correctly raise At…
kr-igor 45d7f7d
fix(test): rewrite step signal tests to inject module state directly
kr-igor 0fd2606
feat(pytorch): propagate service to C tracer and rank span
kr-igor dc4e82c
fix(pytorch): use int_service for pytorch.rank to correctly inherit D…
kr-igor 9ee855f
fix(pytorch): propagate span.service to C tracer instead of ddtrace.c…
kr-igor 2894d1d
fix: remove unused ext_service import from _rank_root.py
kr-igor 14be5c1
feat(pytorch): detach pytorch.rank from Ray trace; correlate via trai…
kr-igor 034d2f5
refactor(pytorch): refactoring / cleanup
kr-igor 578e1db
fix(pytorch): restore __init__.py, fix span parenting and version con…
kr-igor 5ed0af7
fix(pytorch): restore torch <3.0 upper bound guard and fix Ray span p…
kr-igor 03f2c01
fix(pytorch): include DD_PYTORCH_JOB_ID in no-job-id warning message
kr-igor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -227,6 +227,3 @@ src/native/target* | |
|
|
||
| # APM AI Toolkit Analysis Logs | ||
| .analysis/ | ||
|
|
||
| # file created when running scripts/lint | ||
| uv.lock | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # | ||
| # This file is autogenerated by pip-compile with Python 3.10 | ||
| # by the following command: | ||
| # | ||
| # pip-compile --allow-unsafe --no-annotate .riot/requirements/1059304.in | ||
| # | ||
| attrs==26.1.0 | ||
| coverage[toml]==7.14.1 | ||
| exceptiongroup==1.3.1 | ||
| filelock==3.29.1 | ||
| fsspec==2026.4.0 | ||
| hypothesis==6.45.0 | ||
| iniconfig==2.3.0 | ||
| jinja2==3.1.6 | ||
| markupsafe==3.0.3 | ||
| mock==5.2.0 | ||
| mpmath==1.3.0 | ||
| networkx==3.4.2 | ||
| opentracing==2.4.0 | ||
| packaging==26.2 | ||
| pluggy==1.6.0 | ||
| pygments==2.20.0 | ||
| pytest==9.0.3 | ||
| pytest-cov==7.1.0 | ||
| pytest-mock==3.15.1 | ||
| sortedcontainers==2.4.0 | ||
| sympy==1.14.0 | ||
| tomli==2.4.1 | ||
| torch==2.3.1 | ||
| typing-extensions==4.15.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # | ||
| # This file is autogenerated by pip-compile with Python 3.12 | ||
| # by the following command: | ||
| # | ||
| # pip-compile --allow-unsafe --no-annotate .riot/requirements/116b0b8.in | ||
| # | ||
| attrs==26.1.0 | ||
| coverage[toml]==7.14.1 | ||
| filelock==3.29.1 | ||
| fsspec==2026.4.0 | ||
| hypothesis==6.45.0 | ||
| iniconfig==2.3.0 | ||
| jinja2==3.1.6 | ||
| markupsafe==3.0.3 | ||
| mock==5.2.0 | ||
| mpmath==1.3.0 | ||
| networkx==3.6.1 | ||
| opentracing==2.4.0 | ||
| packaging==26.2 | ||
| pluggy==1.6.0 | ||
| pygments==2.20.0 | ||
| pytest==9.0.3 | ||
| pytest-cov==7.1.0 | ||
| pytest-mock==3.15.1 | ||
| sortedcontainers==2.4.0 | ||
| sympy==1.14.0 | ||
| torch==2.3.1 | ||
| typing-extensions==4.15.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # | ||
| # This file is autogenerated by pip-compile with Python 3.10 | ||
| # by the following command: | ||
| # | ||
| # pip-compile --allow-unsafe --no-annotate .riot/requirements/139b6b2.in | ||
| # | ||
| attrs==26.1.0 | ||
| coverage[toml]==7.14.1 | ||
| exceptiongroup==1.3.1 | ||
| filelock==3.29.1 | ||
| fsspec==2026.4.0 | ||
| hypothesis==6.45.0 | ||
| iniconfig==2.3.0 | ||
| jinja2==3.1.6 | ||
| markupsafe==3.0.3 | ||
| mock==5.2.0 | ||
| mpmath==1.3.0 | ||
| networkx==3.4.2 | ||
| opentracing==2.4.0 | ||
| packaging==26.2 | ||
| pluggy==1.6.0 | ||
| pygments==2.20.0 | ||
| pytest==9.0.3 | ||
| pytest-cov==7.1.0 | ||
| pytest-mock==3.15.1 | ||
| sortedcontainers==2.4.0 | ||
| sympy==1.14.0 | ||
| tomli==2.4.1 | ||
| torch==2.1.2 | ||
| typing-extensions==4.15.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # | ||
| # This file is autogenerated by pip-compile with Python 3.11 | ||
| # by the following command: | ||
| # | ||
| # pip-compile --allow-unsafe --no-annotate .riot/requirements/177b157.in | ||
| # | ||
| attrs==26.1.0 | ||
| coverage[toml]==7.14.1 | ||
| filelock==3.29.1 | ||
| hypothesis==6.45.0 | ||
| iniconfig==2.3.0 | ||
| jinja2==3.1.6 | ||
| markupsafe==3.0.3 | ||
| mock==5.2.0 | ||
| mpmath==1.3.0 | ||
| networkx==3.6.1 | ||
| opentracing==2.4.0 | ||
| packaging==26.2 | ||
| pluggy==1.6.0 | ||
| pygments==2.20.0 | ||
| pytest==9.0.3 | ||
| pytest-cov==7.1.0 | ||
| pytest-mock==3.15.1 | ||
| sortedcontainers==2.4.0 | ||
| sympy==1.14.0 | ||
| torch==2.0.1 | ||
| typing-extensions==4.15.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # | ||
| # This file is autogenerated by pip-compile with Python 3.11 | ||
| # by the following command: | ||
| # | ||
| # pip-compile --allow-unsafe --no-annotate .riot/requirements/17a8226.in | ||
| # | ||
| attrs==26.1.0 | ||
| coverage[toml]==7.14.1 | ||
| filelock==3.29.1 | ||
| fsspec==2026.4.0 | ||
| hypothesis==6.45.0 | ||
| iniconfig==2.3.0 | ||
| jinja2==3.1.6 | ||
| markupsafe==3.0.3 | ||
| mock==5.2.0 | ||
| mpmath==1.3.0 | ||
| networkx==3.6.1 | ||
| opentracing==2.4.0 | ||
| packaging==26.2 | ||
| pluggy==1.6.0 | ||
| pygments==2.20.0 | ||
| pytest==9.0.3 | ||
| pytest-cov==7.1.0 | ||
| pytest-mock==3.15.1 | ||
| sortedcontainers==2.4.0 | ||
| sympy==1.14.0 | ||
| torch==2.1.2 | ||
| typing-extensions==4.15.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # | ||
| # This file is autogenerated by pip-compile with Python 3.9 | ||
| # by the following command: | ||
| # | ||
| # pip-compile --allow-unsafe --no-annotate .riot/requirements/181e2d5.in | ||
| # | ||
| attrs==26.1.0 | ||
| coverage[toml]==7.10.7 | ||
| exceptiongroup==1.3.1 | ||
| filelock==3.19.1 | ||
| fsspec==2025.10.0 | ||
| hypothesis==6.45.0 | ||
| iniconfig==2.1.0 | ||
| jinja2==3.1.6 | ||
| markupsafe==3.0.3 | ||
| mock==5.2.0 | ||
| mpmath==1.3.0 | ||
| networkx==3.2.1 | ||
| opentracing==2.4.0 | ||
| packaging==26.2 | ||
| pluggy==1.6.0 | ||
| pygments==2.20.0 | ||
| pytest==8.4.2 | ||
| pytest-cov==7.1.0 | ||
| pytest-mock==3.15.1 | ||
| sortedcontainers==2.4.0 | ||
| sympy==1.14.0 | ||
| tomli==2.4.1 | ||
| torch==2.1.2 | ||
| typing-extensions==4.15.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # | ||
| # This file is autogenerated by pip-compile with Python 3.9 | ||
| # by the following command: | ||
| # | ||
| # pip-compile --allow-unsafe --no-annotate .riot/requirements/1a4c54d.in | ||
| # | ||
| attrs==26.1.0 | ||
| coverage[toml]==7.10.7 | ||
| exceptiongroup==1.3.1 | ||
| filelock==3.19.1 | ||
| fsspec==2025.10.0 | ||
| hypothesis==6.45.0 | ||
| iniconfig==2.1.0 | ||
| jinja2==3.1.6 | ||
| markupsafe==3.0.3 | ||
| mock==5.2.0 | ||
| mpmath==1.3.0 | ||
| networkx==3.2.1 | ||
| opentracing==2.4.0 | ||
| packaging==26.2 | ||
| pluggy==1.6.0 | ||
| pygments==2.20.0 | ||
| pytest==8.4.2 | ||
| pytest-cov==7.1.0 | ||
| pytest-mock==3.15.1 | ||
| sortedcontainers==2.4.0 | ||
| sympy==1.14.0 | ||
| tomli==2.4.1 | ||
| torch==2.3.1 | ||
| typing-extensions==4.15.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # | ||
| # This file is autogenerated by pip-compile with Python 3.11 | ||
| # by the following command: | ||
| # | ||
| # pip-compile --allow-unsafe --no-annotate .riot/requirements/1a9e432.in | ||
| # | ||
| attrs==26.1.0 | ||
| coverage[toml]==7.14.1 | ||
| filelock==3.29.1 | ||
| fsspec==2026.4.0 | ||
| hypothesis==6.45.0 | ||
| iniconfig==2.3.0 | ||
| jinja2==3.1.6 | ||
| markupsafe==3.0.3 | ||
| mock==5.2.0 | ||
| mpmath==1.3.0 | ||
| networkx==3.6.1 | ||
| opentracing==2.4.0 | ||
| packaging==26.2 | ||
| pluggy==1.6.0 | ||
| pygments==2.20.0 | ||
| pytest==9.0.3 | ||
| pytest-cov==7.1.0 | ||
| pytest-mock==3.15.1 | ||
| sortedcontainers==2.4.0 | ||
| sympy==1.14.0 | ||
| torch==2.2.2 | ||
| typing-extensions==4.15.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # | ||
| # This file is autogenerated by pip-compile with Python 3.11 | ||
| # by the following command: | ||
| # | ||
| # pip-compile --allow-unsafe --no-annotate .riot/requirements/1b254f8.in | ||
| # | ||
| attrs==26.1.0 | ||
| coverage[toml]==7.14.1 | ||
| filelock==3.29.1 | ||
| fsspec==2026.4.0 | ||
| hypothesis==6.45.0 | ||
| iniconfig==2.3.0 | ||
| jinja2==3.1.6 | ||
| markupsafe==3.0.3 | ||
| mock==5.2.0 | ||
| mpmath==1.3.0 | ||
| networkx==3.6.1 | ||
| opentracing==2.4.0 | ||
| packaging==26.2 | ||
| pluggy==1.6.0 | ||
| pygments==2.20.0 | ||
| pytest==9.0.3 | ||
| pytest-cov==7.1.0 | ||
| pytest-mock==3.15.1 | ||
| sortedcontainers==2.4.0 | ||
| sympy==1.14.0 | ||
| torch==2.3.1 | ||
| typing-extensions==4.15.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # | ||
| # This file is autogenerated by pip-compile with Python 3.10 | ||
| # by the following command: | ||
| # | ||
| # pip-compile --allow-unsafe --no-annotate .riot/requirements/1d55347.in | ||
| # | ||
| attrs==26.1.0 | ||
| coverage[toml]==7.14.1 | ||
| exceptiongroup==1.3.1 | ||
| filelock==3.29.1 | ||
| fsspec==2026.4.0 | ||
| hypothesis==6.45.0 | ||
| iniconfig==2.3.0 | ||
| jinja2==3.1.6 | ||
| markupsafe==3.0.3 | ||
| mock==5.2.0 | ||
| mpmath==1.3.0 | ||
| networkx==3.4.2 | ||
| opentracing==2.4.0 | ||
| packaging==26.2 | ||
| pluggy==1.6.0 | ||
| pygments==2.20.0 | ||
| pytest==9.0.3 | ||
| pytest-cov==7.1.0 | ||
| pytest-mock==3.15.1 | ||
| sortedcontainers==2.4.0 | ||
| sympy==1.14.0 | ||
| tomli==2.4.1 | ||
| torch==2.2.2 | ||
| typing-extensions==4.15.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # | ||
| # This file is autogenerated by pip-compile with Python 3.9 | ||
| # by the following command: | ||
| # | ||
| # pip-compile --allow-unsafe --no-annotate .riot/requirements/6444f67.in | ||
| # | ||
| attrs==26.1.0 | ||
| coverage[toml]==7.10.7 | ||
| exceptiongroup==1.3.1 | ||
| filelock==3.19.1 | ||
| hypothesis==6.45.0 | ||
| iniconfig==2.1.0 | ||
| jinja2==3.1.6 | ||
| markupsafe==3.0.3 | ||
| mock==5.2.0 | ||
| mpmath==1.3.0 | ||
| networkx==3.2.1 | ||
| opentracing==2.4.0 | ||
| packaging==26.2 | ||
| pluggy==1.6.0 | ||
| pygments==2.20.0 | ||
| pytest==8.4.2 | ||
| pytest-cov==7.1.0 | ||
| pytest-mock==3.15.1 | ||
| sortedcontainers==2.4.0 | ||
| sympy==1.14.0 | ||
| tomli==2.4.1 | ||
| torch==2.0.1 | ||
| typing-extensions==4.15.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # | ||
| # This file is autogenerated by pip-compile with Python 3.12 | ||
| # by the following command: | ||
| # | ||
| # pip-compile --allow-unsafe --no-annotate --output-file=.riot/requirements/a9c7746.txt .riot/requirements/a9c7746.in | ||
| # | ||
| attrs==26.1.0 | ||
| coverage[toml]==7.14.1 | ||
| filelock==3.29.1 | ||
| fsspec==2026.4.0 | ||
| hypothesis==6.45.0 | ||
| iniconfig==2.3.0 | ||
| jinja2==3.1.6 | ||
| markupsafe==3.0.3 | ||
| mock==5.2.0 | ||
| mpmath==1.3.0 | ||
| networkx==3.6.1 | ||
| opentracing==2.4.0 | ||
| packaging==26.2 | ||
| pluggy==1.6.0 | ||
| pygments==2.20.0 | ||
| pytest==9.0.3 | ||
| pytest-cov==7.1.0 | ||
| pytest-mock==3.15.1 | ||
| sortedcontainers==2.4.0 | ||
| sympy==1.14.0 | ||
| torch==2.2.2 | ||
| typing-extensions==4.15.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # | ||
| # This file is autogenerated by pip-compile with Python 3.10 | ||
| # by the following command: | ||
| # | ||
| # pip-compile --allow-unsafe --no-annotate .riot/requirements/b77de6a.in | ||
| # | ||
| attrs==26.1.0 | ||
| coverage[toml]==7.14.1 | ||
| exceptiongroup==1.3.1 | ||
| filelock==3.29.1 | ||
| hypothesis==6.45.0 | ||
| iniconfig==2.3.0 | ||
| jinja2==3.1.6 | ||
| markupsafe==3.0.3 | ||
| mock==5.2.0 | ||
| mpmath==1.3.0 | ||
| networkx==3.4.2 | ||
| opentracing==2.4.0 | ||
| packaging==26.2 | ||
| pluggy==1.6.0 | ||
| pygments==2.20.0 | ||
| pytest==9.0.3 | ||
| pytest-cov==7.1.0 | ||
| pytest-mock==3.15.1 | ||
| sortedcontainers==2.4.0 | ||
| sympy==1.14.0 | ||
| tomli==2.4.1 | ||
| torch==2.0.1 | ||
| typing-extensions==4.15.0 |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't want to remove this
.gitignore, can we add it back?