fix: get_tensor_model_parallel_group_if_none is missing for mcore v0.12.1#53
Open
quancs wants to merge 1 commit into
Open
fix: get_tensor_model_parallel_group_if_none is missing for mcore v0.12.1#53quancs wants to merge 1 commit into
quancs wants to merge 1 commit into
Conversation
Adiactive
added a commit
to Adiactive/AReaL
that referenced
this pull request
Apr 28, 2026
mbridge >= 310e8fb (used on the NPU branch via pyproject.npu.toml) imports ``get_tensor_model_parallel_group_if_none`` from ``megatron.core.utils`` at module load time in its qwen3_vl modules. That symbol does not exist in megatron-core 0.12.1 (the version shipped with MindSpeed on Ascend NPU), so importing mbridge raises ImportError before any AReaL code runs. Mirror the fallback added in ISEEKYAN/mbridge#53 — but inside AReaL, since mbridge is a pinned dependency we don't want to fork. Inject the function into ``megatron.core.utils`` right after the MindSpeed adaptor init and before the first ``import mbridge`` in ``megatron_engine.py``. The shim is a no-op on mcore >= 0.13 (skipped via ``hasattr``) and matches the deprecation-warning behavior of the upstream mcore implementation. Also resolve a latent F821 in the same file: move ``MegatronBridgeLoRA`` into a ``TYPE_CHECKING`` import so the ``bridge_lora: MegatronBridgeLoRA | None`` annotation no longer requires a runtime ``megatron.bridge`` import on NPU (where the package is absent and the import is already deferred to call time).
Adiactive
added a commit
to Adiactive/AReaL
that referenced
this pull request
Apr 28, 2026
mbridge >= 310e8fb (used on the NPU branch via pyproject.npu.toml) imports ``get_tensor_model_parallel_group_if_none`` from ``megatron.core.utils`` at module load time in its qwen3_vl modules. That symbol does not exist in megatron-core 0.12.1 (the version shipped with MindSpeed on Ascend NPU), so importing mbridge raises ImportError before any AReaL code runs. Mirror the fallback added in ISEEKYAN/mbridge#53 — but inside AReaL, since mbridge is a pinned dependency we don't want to fork. Inject the function into ``megatron.core.utils`` right after the MindSpeed adaptor init and before the first ``import mbridge`` in ``megatron_engine.py``. The shim is a no-op on mcore >= 0.13 (skipped via ``hasattr``) and matches the deprecation-warning behavior of the upstream mcore implementation. Also resolve a latent F821 in the same file: move ``MegatronBridgeLoRA`` into a ``TYPE_CHECKING`` import so the ``bridge_lora: MegatronBridgeLoRA | None`` annotation no longer requires a runtime ``megatron.bridge`` import on NPU (where the package is absent and the import is already deferred to call time).
Adiactive
added a commit
to Adiactive/AReaL
that referenced
this pull request
Apr 29, 2026
mbridge >= 310e8fb (used on the NPU branch via pyproject.npu.toml) imports ``get_tensor_model_parallel_group_if_none`` from ``megatron.core.utils`` at module load time in its qwen3_vl modules. That symbol does not exist in megatron-core 0.12.1 (the version shipped with MindSpeed on Ascend NPU), so importing mbridge raises ImportError before any AReaL code runs. Mirror the fallback added in ISEEKYAN/mbridge#53 — but inside AReaL, since mbridge is a pinned dependency we don't want to fork. Inject the function into ``megatron.core.utils`` right after the MindSpeed adaptor init and before the first ``import mbridge`` in ``megatron_engine.py``. The shim is a no-op on mcore >= 0.13 (skipped via ``hasattr``) and matches the deprecation-warning behavior of the upstream mcore implementation. Also resolve a latent F821 in the same file: move ``MegatronBridgeLoRA`` into a ``TYPE_CHECKING`` import so the ``bridge_lora: MegatronBridgeLoRA | None`` annotation no longer requires a runtime ``megatron.bridge`` import on NPU (where the package is absent and the import is already deferred to call time).
Adiactive
added a commit
to Adiactive/AReaL
that referenced
this pull request
Apr 29, 2026
mbridge >= 310e8fb (used on the NPU branch via pyproject.npu.toml) imports ``get_tensor_model_parallel_group_if_none`` from ``megatron.core.utils`` at module load time in its qwen3_vl modules. That symbol does not exist in megatron-core 0.12.1 (the version shipped with MindSpeed on Ascend NPU), so importing mbridge raises ImportError before any AReaL code runs. Mirror the fallback added in ISEEKYAN/mbridge#53 — but inside AReaL, since mbridge is a pinned dependency we don't want to fork. Inject the function into ``megatron.core.utils`` right after the MindSpeed adaptor init and before the first ``import mbridge`` in ``megatron_engine.py``. The shim is a no-op on mcore >= 0.13 (skipped via ``hasattr``) and matches the deprecation-warning behavior of the upstream mcore implementation. Also resolve a latent F821 in the same file: move ``MegatronBridgeLoRA`` into a ``TYPE_CHECKING`` import so the ``bridge_lora: MegatronBridgeLoRA | None`` annotation no longer requires a runtime ``megatron.bridge`` import on NPU (where the package is absent and the import is already deferred to call time).
Adiactive
added a commit
to Adiactive/AReaL
that referenced
this pull request
Apr 29, 2026
mbridge >= 310e8fb (used on the NPU branch via pyproject.npu.toml) imports ``get_tensor_model_parallel_group_if_none`` from ``megatron.core.utils`` at module load time in its qwen3_vl modules. That symbol does not exist in megatron-core 0.12.1 (the version shipped with MindSpeed on Ascend NPU), so importing mbridge raises ImportError before any AReaL code runs. Mirror the fallback added in ISEEKYAN/mbridge#53 — but inside AReaL, since mbridge is a pinned dependency we don't want to fork. Inject the function into ``megatron.core.utils`` right after the MindSpeed adaptor init and before the first ``import mbridge`` in ``megatron_engine.py``. The shim is a no-op on mcore >= 0.13 (skipped via ``hasattr``) and matches the deprecation-warning behavior of the upstream mcore implementation. Also resolve a latent F821 in the same file: move ``MegatronBridgeLoRA`` into a ``TYPE_CHECKING`` import so the ``bridge_lora: MegatronBridgeLoRA | None`` annotation no longer requires a runtime ``megatron.bridge`` import on NPU (where the package is absent and the import is already deferred to call time).
Adiactive
added a commit
to Adiactive/AReaL
that referenced
this pull request
Apr 30, 2026
mbridge >= 310e8fb (used on the NPU branch via pyproject.npu.toml) imports ``get_tensor_model_parallel_group_if_none`` from ``megatron.core.utils`` at module load time in its qwen3_vl modules. That symbol does not exist in megatron-core 0.12.1 (the version shipped with MindSpeed on Ascend NPU), so importing mbridge raises ImportError before any AReaL code runs. Mirror the fallback added in ISEEKYAN/mbridge#53 — but inside AReaL, since mbridge is a pinned dependency we don't want to fork. Inject the function into ``megatron.core.utils`` right after the MindSpeed adaptor init and before the first ``import mbridge`` in ``megatron_engine.py``. The shim is a no-op on mcore >= 0.13 (skipped via ``hasattr``) and matches the deprecation-warning behavior of the upstream mcore implementation. Also resolve a latent F821 in the same file: move ``MegatronBridgeLoRA`` into a ``TYPE_CHECKING`` import so the ``bridge_lora: MegatronBridgeLoRA | None`` annotation no longer requires a runtime ``megatron.bridge`` import on NPU (where the package is absent and the import is already deferred to call time).
Adiactive
added a commit
to Adiactive/AReaL
that referenced
this pull request
May 6, 2026
mbridge >= 310e8fb (used on the NPU branch via pyproject.npu.toml) imports ``get_tensor_model_parallel_group_if_none`` from ``megatron.core.utils`` at module load time in its qwen3_vl modules. That symbol does not exist in megatron-core 0.12.1 (the version shipped with MindSpeed on Ascend NPU), so importing mbridge raises ImportError before any AReaL code runs. Mirror the fallback added in ISEEKYAN/mbridge#53 — but inside AReaL, since mbridge is a pinned dependency we don't want to fork. Inject the function into ``megatron.core.utils`` right after the MindSpeed adaptor init and before the first ``import mbridge`` in ``megatron_engine.py``. The shim is a no-op on mcore >= 0.13 (skipped via ``hasattr``) and matches the deprecation-warning behavior of the upstream mcore implementation. Also resolve a latent F821 in the same file: move ``MegatronBridgeLoRA`` into a ``TYPE_CHECKING`` import so the ``bridge_lora: MegatronBridgeLoRA | None`` annotation no longer requires a runtime ``megatron.bridge`` import on NPU (where the package is absent and the import is already deferred to call time).
Adiactive
added a commit
to Adiactive/AReaL
that referenced
this pull request
May 6, 2026
mbridge >= 310e8fb (used on the NPU branch via pyproject.npu.toml) imports ``get_tensor_model_parallel_group_if_none`` from ``megatron.core.utils`` at module load time in its qwen3_vl modules. That symbol does not exist in megatron-core 0.12.1 (the version shipped with MindSpeed on Ascend NPU), so importing mbridge raises ImportError before any AReaL code runs. Mirror the fallback added in ISEEKYAN/mbridge#53 — but inside AReaL, since mbridge is a pinned dependency we don't want to fork. Inject the function into ``megatron.core.utils`` right after the MindSpeed adaptor init and before the first ``import mbridge`` in ``megatron_engine.py``. The shim is a no-op on mcore >= 0.13 (skipped via ``hasattr``) and matches the deprecation-warning behavior of the upstream mcore implementation. Also resolve a latent F821 in the same file: move ``MegatronBridgeLoRA`` into a ``TYPE_CHECKING`` import so the ``bridge_lora: MegatronBridgeLoRA | None`` annotation no longer requires a runtime ``megatron.bridge`` import on NPU (where the package is absent and the import is already deferred to call time).
Adiactive
added a commit
to Adiactive/AReaL
that referenced
this pull request
May 8, 2026
mbridge >= 310e8fb (used on the NPU branch via pyproject.npu.toml) imports ``get_tensor_model_parallel_group_if_none`` from ``megatron.core.utils`` at module load time in its qwen3_vl modules. That symbol does not exist in megatron-core 0.12.1 (the version shipped with MindSpeed on Ascend NPU), so importing mbridge raises ImportError before any AReaL code runs. Mirror the fallback added in ISEEKYAN/mbridge#53 — but inside AReaL, since mbridge is a pinned dependency we don't want to fork. Inject the function into ``megatron.core.utils`` right after the MindSpeed adaptor init and before the first ``import mbridge`` in ``megatron_engine.py``. The shim is a no-op on mcore >= 0.13 (skipped via ``hasattr``) and matches the deprecation-warning behavior of the upstream mcore implementation. Also resolve a latent F821 in the same file: move ``MegatronBridgeLoRA`` into a ``TYPE_CHECKING`` import so the ``bridge_lora: MegatronBridgeLoRA | None`` annotation no longer requires a runtime ``megatron.bridge`` import on NPU (where the package is absent and the import is already deferred to call time).
Adiactive
added a commit
to Adiactive/AReaL
that referenced
this pull request
May 8, 2026
mbridge >= 310e8fb (used on the NPU branch via pyproject.npu.toml) imports ``get_tensor_model_parallel_group_if_none`` from ``megatron.core.utils`` at module load time in its qwen3_vl modules. That symbol does not exist in megatron-core 0.12.1 (the version shipped with MindSpeed on Ascend NPU), so importing mbridge raises ImportError before any AReaL code runs. Mirror the fallback added in ISEEKYAN/mbridge#53 — but inside AReaL, since mbridge is a pinned dependency we don't want to fork. Inject the function into ``megatron.core.utils`` right after the MindSpeed adaptor init and before the first ``import mbridge`` in ``megatron_engine.py``. The shim is a no-op on mcore >= 0.13 (skipped via ``hasattr``) and matches the deprecation-warning behavior of the upstream mcore implementation. Also resolve a latent F821 in the same file: move ``MegatronBridgeLoRA`` into a ``TYPE_CHECKING`` import so the ``bridge_lora: MegatronBridgeLoRA | None`` annotation no longer requires a runtime ``megatron.bridge`` import on NPU (where the package is absent and the import is already deferred to call time).
Adiactive
added a commit
to Adiactive/AReaL
that referenced
this pull request
May 12, 2026
mbridge >= 310e8fb (used on the NPU branch via pyproject.npu.toml) imports ``get_tensor_model_parallel_group_if_none`` from ``megatron.core.utils`` at module load time in its qwen3_vl modules. That symbol does not exist in megatron-core 0.12.1 (the version shipped with MindSpeed on Ascend NPU), so importing mbridge raises ImportError before any AReaL code runs. Mirror the fallback added in ISEEKYAN/mbridge#53 — but inside AReaL, since mbridge is a pinned dependency we don't want to fork. Inject the function into ``megatron.core.utils`` right after the MindSpeed adaptor init and before the first ``import mbridge`` in ``megatron_engine.py``. The shim is a no-op on mcore >= 0.13 (skipped via ``hasattr``) and matches the deprecation-warning behavior of the upstream mcore implementation. Also resolve a latent F821 in the same file: move ``MegatronBridgeLoRA`` into a ``TYPE_CHECKING`` import so the ``bridge_lora: MegatronBridgeLoRA | None`` annotation no longer requires a runtime ``megatron.bridge`` import on NPU (where the package is absent and the import is already deferred to call time).
Adiactive
added a commit
to Adiactive/AReaL
that referenced
this pull request
Jun 23, 2026
mbridge >= 310e8fb (used on the NPU branch via pyproject.npu.toml) imports ``get_tensor_model_parallel_group_if_none`` from ``megatron.core.utils`` at module load time in its qwen3_vl modules. That symbol does not exist in megatron-core 0.12.1 (the version shipped with MindSpeed on Ascend NPU), so importing mbridge raises ImportError before any AReaL code runs. Mirror the fallback added in ISEEKYAN/mbridge#53 — but inside AReaL, since mbridge is a pinned dependency we don't want to fork. Inject the function into ``megatron.core.utils`` right after the MindSpeed adaptor init and before the first ``import mbridge`` in ``megatron_engine.py``. The shim is a no-op on mcore >= 0.13 (skipped via ``hasattr``) and matches the deprecation-warning behavior of the upstream mcore implementation. Also resolve a latent F821 in the same file: move ``MegatronBridgeLoRA`` into a ``TYPE_CHECKING`` import so the ``bridge_lora: MegatronBridgeLoRA | None`` annotation no longer requires a runtime ``megatron.bridge`` import on NPU (where the package is absent and the import is already deferred to call time).
Adiactive
added a commit
to Adiactive/AReaL
that referenced
this pull request
Jun 23, 2026
mbridge >= 310e8fb (used on the NPU branch via pyproject.npu.toml) imports ``get_tensor_model_parallel_group_if_none`` from ``megatron.core.utils`` at module load time in its qwen3_vl modules. That symbol does not exist in megatron-core 0.12.1 (the version shipped with MindSpeed on Ascend NPU), so importing mbridge raises ImportError before any AReaL code runs. Mirror the fallback added in ISEEKYAN/mbridge#53 — but inside AReaL, since mbridge is a pinned dependency we don't want to fork. Inject the function into ``megatron.core.utils`` right after the MindSpeed adaptor init and before the first ``import mbridge`` in ``megatron_engine.py``. The shim is a no-op on mcore >= 0.13 (skipped via ``hasattr``) and matches the deprecation-warning behavior of the upstream mcore implementation. Also resolve a latent F821 in the same file: move ``MegatronBridgeLoRA`` into a ``TYPE_CHECKING`` import so the ``bridge_lora: MegatronBridgeLoRA | None`` annotation no longer requires a runtime ``megatron.bridge`` import on NPU (where the package is absent and the import is already deferred to call time).
HwVanICI
pushed a commit
to HwVanICI/AReaL
that referenced
this pull request
Jun 25, 2026
mbridge >= 310e8fb (used on the NPU branch via pyproject.npu.toml) imports ``get_tensor_model_parallel_group_if_none`` from ``megatron.core.utils`` at module load time in its qwen3_vl modules. That symbol does not exist in megatron-core 0.12.1 (the version shipped with MindSpeed on Ascend NPU), so importing mbridge raises ImportError before any AReaL code runs. Mirror the fallback added in ISEEKYAN/mbridge#53 — but inside AReaL, since mbridge is a pinned dependency we don't want to fork. Inject the function into ``megatron.core.utils`` right after the MindSpeed adaptor init and before the first ``import mbridge`` in ``megatron_engine.py``. The shim is a no-op on mcore >= 0.13 (skipped via ``hasattr``) and matches the deprecation-warning behavior of the upstream mcore implementation. Also resolve a latent F821 in the same file: move ``MegatronBridgeLoRA`` into a ``TYPE_CHECKING`` import so the ``bridge_lora: MegatronBridgeLoRA | None`` annotation no longer requires a runtime ``megatron.bridge`` import on NPU (where the package is absent and the import is already deferred to call time).
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.
solve the issue: #50