Clarify how traces are collected + Some Minor Documentation Updates #119
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.
What does this PR do?
Clarifies documentation surrounding how traces are collected.
In #107, I had some issues collecting traces to use with HTA. The core of this issue was the example on the Read The Docs for this project. From an outside perspective, it is not immediately clear how to collect traces.
My Code:
Code from the documentation:
The difference here is that the code in the documentation ensures to step for every batch rather than every epoch. A subtle difference, but one a core library maintainer was unable to spot right away.
Given models are trained in many epochs, updating the examples to show the more common pattern of training for epochs and iterating over the data loader for each epoch helps clarify trace collection in my opinion.
That was the main change, but I made some others. Please let me know if you have questions. I marked this PR as a draft because I would love to hear from maintainers about their opinions on documentation and the right thing to do.
Also, if no ranks are found, what are your thoughts on populating this information with a rank of zero. Or, alternatively, allowing the user to specify a default rank when creating a
TraceAnalysisobject.i.e.
Let me know your thoughts. Thank you!
Before submitting