Fix HabanaProfile unit tests to align with idempotent start behavior#2258
Merged
astachowiczhabana merged 1 commit intohuggingface:v1.20-releasefrom Sep 15, 2025
Merged
Conversation
astachowiczhabana
added a commit
that referenced
this pull request
Sep 17, 2025
…2258) Co-authored-by: Adam Stachowicz <astachow@habana.ai>
gplutop7
pushed a commit
to HabanaAI/optimum-habana-fork
that referenced
this pull request
Oct 15, 2025
…uggingface#2258) (huggingface#683) Co-authored-by: Adam Stachowicz <105052242+astachowiczhabana@users.noreply.github.com> Co-authored-by: Adam Stachowicz <astachow@habana.ai>
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.
This pull request updates the Habana profiler unit tests to reflect changes in how multiple profiler instances are managed. The most important changes include switching from a list to a
WeakSetfor tracking profiler instances and updating test logic to match the new behavior where starting a new profiler stops any previous one.Profiler instance management:
HabanaProfile._profilersfrom a list to aweakref.WeakSetto better manage memory and object lifecycle. [1] [2]Test behavior updates: