Skip to content

Move import to local scope in run_lm_eval, to allow prior env vars initialization.#2126

Merged
astachowiczhabana merged 2 commits into
huggingface:v1.19-releasefrom
AKloniecki:SW-234041
Jul 16, 2025
Merged

Move import to local scope in run_lm_eval, to allow prior env vars initialization.#2126
astachowiczhabana merged 2 commits into
huggingface:v1.19-releasefrom
AKloniecki:SW-234041

Conversation

@AKloniecki
Copy link
Copy Markdown
Collaborator

What does this PR do?

This PR fixes RuntimeError: collective nonSFG is not supported during hpu graph capturing error, by allowing for proper environment variables initialization, which is done during initialize_model(args, logger) call, prior to importing optimum.habana.
This ensures that shared object is loaded after env vars are set and functions properly.

…itialization.

Signed-off-by: Artur Kloniecki <aklonieckix@habana.ai>
Signed-off-by: Artur Kloniecki <aklonieckix@habana.ai>
@astachowiczhabana astachowiczhabana merged commit 75b4765 into huggingface:v1.19-release Jul 16, 2025
1 check failed
@AKloniecki AKloniecki deleted the SW-234041 branch July 17, 2025 07:06
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants