Move import to local scope in run_lm_eval, to allow prior env vars initialization.#2126
Merged
astachowiczhabana merged 2 commits intoJul 16, 2025
Merged
Conversation
79dc01d to
62b45d7
Compare
56effab to
2f3fdb8
Compare
…itialization. Signed-off-by: Artur Kloniecki <aklonieckix@habana.ai>
Signed-off-by: Artur Kloniecki <aklonieckix@habana.ai>
gplutop7
pushed a commit
to HabanaAI/optimum-habana-fork
that referenced
this pull request
Oct 15, 2025
…itialization. (huggingface#2126) (huggingface#431) * Move import to local scope in run_lm_eval, to allow prior env vars initialization. * Address PR comment: Adding comment explaining delayed import. --------- Signed-off-by: Artur Kloniecki <aklonieckix@habana.ai> Co-authored-by: Artur KlonieckiX <arturx.kloniecki@intel.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.
What does this PR do?
This PR fixes
RuntimeError: collective nonSFG is not supported during hpu graph capturingerror, by allowing for proper environment variables initialization, which is done duringinitialize_model(args, logger)call, prior to importingoptimum.habana.This ensures that shared object is loaded after env vars are set and functions properly.