Improvements to Communication Logger#7404
Merged
sfc-gh-truwase merged 12 commits intodeepspeedai:masterfrom Jul 9, 2025
Merged
Improvements to Communication Logger#7404sfc-gh-truwase merged 12 commits intodeepspeedai:masterfrom
sfc-gh-truwase merged 12 commits intodeepspeedai:masterfrom
Conversation
In `comms_logging.py`, when calling log_all and the `show_straggler` option is enabled, an all_reduce is performed across all nodes to calculate the minimum latency to find stragglers. However, the tensors on which this is performed are not sent to the configured devices. This commit adds this capability using deepspeed's abstract accelerator api. Signed-off-by: Alex Kiefer <alexkiefer51@gmail.com>
The current implementation of the communication logging api is somewhat limited in its ability to get in depth information about model operations. For example, currently the log is only able to print to stdout, though the information about communications may be useful to have in its raw form, (ie logging to wandb or tensorboard during training). The logs are also cumulative due it being a global variable. If, for example, we would like to get information about each specific epoch/iteration, we could not easily do this. This commit adds the following features - ability to return communication logs as dictionaries, rather than only printing to stdout - convenience helper functions for getting information about current logs - ability to clear existing log operations - additional documentation for logging operations Signed-off-by: Alex Kiefer <alexkiefer51@gmail.com>
Signed-off-by: Alex Kiefer <alexkiefer51@gmail.com>
|
|
||
| summary[msg_size] = { | ||
| "count": count, | ||
| "total_latency_ms": total_lat, |
Collaborator
There was a problem hiding this comment.
To improve usability (avoid typo issues), it would help to convert this hardcoded constants to enums?
Contributor
Author
There was a problem hiding this comment.
Are you referencing the second parameters passed to trim_mean ? I am not sure which hardcoded constants you are referencing here.
Collaborator
There was a problem hiding this comment.
I am referring to constants such as "count", "total_latency_ms", and "avg_straggler_ms". These are used multiple times and prone to typo errors.
sfc-gh-truwase
approved these changes
Jul 4, 2025
lpnpcs
pushed a commit
to lpnpcs/DeepSpeed
that referenced
this pull request
Jul 30, 2025
These changes add - ability to return communication logs as dictionaries, rather than only printing to stdout - convenience helper functions for getting information about current logs - ability to clear existing log operations - additional documentation for logging operations These address points made in deepspeedai#7403 --------- Signed-off-by: Alex Kiefer <alexkiefer51@gmail.com> Co-authored-by: Masahiro Tanaka <81312776+tohtana@users.noreply.github.com> Co-authored-by: Olatunji Ruwase <tunji.ruwase@snowflake.com> Co-authored-by: Hongwei Chen <33092912+hwchen2017@users.noreply.github.com> Co-authored-by: Logan Adams <114770087+loadams@users.noreply.github.com>
LYMDLUT
pushed a commit
to LYMDLUT/DeepSpeed
that referenced
this pull request
Aug 20, 2025
These changes add - ability to return communication logs as dictionaries, rather than only printing to stdout - convenience helper functions for getting information about current logs - ability to clear existing log operations - additional documentation for logging operations These address points made in deepspeedai#7403 --------- Signed-off-by: Alex Kiefer <alexkiefer51@gmail.com> Co-authored-by: Masahiro Tanaka <81312776+tohtana@users.noreply.github.com> Co-authored-by: Olatunji Ruwase <tunji.ruwase@snowflake.com> Co-authored-by: Hongwei Chen <33092912+hwchen2017@users.noreply.github.com> Co-authored-by: Logan Adams <114770087+loadams@users.noreply.github.com> Signed-off-by: lym <letusgo126@126.com>
mauryaavinash95
pushed a commit
to DataStates/DeepSpeed
that referenced
this pull request
Oct 4, 2025
These changes add - ability to return communication logs as dictionaries, rather than only printing to stdout - convenience helper functions for getting information about current logs - ability to clear existing log operations - additional documentation for logging operations These address points made in deepspeedai#7403 --------- Signed-off-by: Alex Kiefer <alexkiefer51@gmail.com> Co-authored-by: Masahiro Tanaka <81312776+tohtana@users.noreply.github.com> Co-authored-by: Olatunji Ruwase <tunji.ruwase@snowflake.com> Co-authored-by: Hongwei Chen <33092912+hwchen2017@users.noreply.github.com> Co-authored-by: Logan Adams <114770087+loadams@users.noreply.github.com>
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.
These changes add
These address points made in #7403