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.
Shorthand way to grab a tracker
What does this add?
This PR introduces a method to the Accelerator that lets you grab a tracker's internal run if some custom code with it is wanted to be ran
Who is it for?
Closes #592
Why is it needed?
There are needs when using
wandb
for example to access and toy with therun
, such as stated in #592. Currently you need to index into the trackers, hope you find the right one, and then in the case of wandb callrun.run
which is a bit convoluted.What parts of the API does this impact?
User-facing:
Adds a new
Accelerator.get_tracker
method. To get a tracker you should pass in the corresponding string to the.name
attributeInternal structure:
Trackers now have a new abstract property of
tracker
which should be used to return the internal tracking mechanism normal users would expect to interact with.Basic Usage Example(s):
When would I use it, and when wouldn't I?
When custom interactions with a tracker is wanted.