Add logging for async rejections (#1422)#1422
Open
ryanzhang22 wants to merge 2 commits into
Open
Conversation
|
@ryanzhang22 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D103221867. |
05ac582 to
8cb21bd
Compare
ryanzhang22
added a commit
to ryanzhang22/kineto
that referenced
this pull request
Jun 4, 2026
Summary: We do not currently allow async requests to be scheduled if there's an ongoing profiling session. When this happens, we log a warning and return early; there's no indication that the request failed unless the user is looking at the logs. For better tracking, we should emit UST logs for these traces. We need to build some additional machinery here because the logger is seeded with metadata for the in-flight profiling session, and we can't clear it in order to write the async request rejection. So we add a write method which can independently write to the Scuba logs without messing with the existing logger state. Reviewed By: scotts Differential Revision: D103221867
8cb21bd to
c4db864
Compare
…ytorch#1387) Summary: Currently, we don't reset the UST logger between sync (auto-trace)/async (on-demand) runs, so the data from one run can pollute the other. In particular, if we have an async then sync run, the sync run's UST logs will have artifacts from the async run. Before sync/async's `configure` method, we add a `resetLoggerObservers` call. We add it here because `configure` is when we know the request was accepted. Some of the logger's metadata is only set once and is persisted across runs (i.e. cuda version) and clearing it would reset it for future profiling sessions. So we introduce an option to add "persistent" metadata which is not cleared upon `.reset()`. Reviewed By: sanrise, scotts Differential Revision: D103278391
Summary: We do not currently allow async requests to be scheduled if there's an ongoing profiling session. When this happens, we log a warning and return early; there's no indication that the request failed unless the user is looking at the logs. For better tracking, we should emit UST logs for these traces. We need to build some additional machinery here because the logger is seeded with metadata for the in-flight profiling session, and we can't clear it in order to write the async request rejection. So we add a write method which can independently write to the Scuba logs without messing with the existing logger state. Reviewed By: scotts Differential Revision: D103221867
c4db864 to
d9dcf9d
Compare
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:
We do not currently allow async requests to be scheduled if there's an ongoing profiling session. When this happens, we log a warning and return early; there's no indication that the request failed unless the user is looking at the logs.
For better tracking, we should emit UST logs for these traces. We need to build some additional machinery here because the logger is seeded with metadata for the in-flight profiling session, and we can't clear it in order to write the async request rejection. So we add a write method which can independently write to the Scuba logs without messing with the existing logger state.
Reviewed By: scotts
Differential Revision: D103221867