Fix test_nss.py import error when ng_model_gym is not installed#17184
Open
apullin wants to merge 1 commit intopytorch:mainfrom
Open
Fix test_nss.py import error when ng_model_gym is not installed#17184apullin wants to merge 1 commit intopytorch:mainfrom
apullin wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17184
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 Awaiting Approval, 2 New FailuresAs of commit 3a0eb15 with merge base c0cef6c ( AWAITING APPROVAL - The following workflows need approval before CI can run:
NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
c36e449 to
521504a
Compare
Contributor
apullin
pushed a commit
to apullin/executorch
that referenced
this pull request
Feb 3, 2026
…rch#17184) Summary: Fixes test collection failure in CI when `ng_model_gym` is not installed. The `test_nss.py` file imports `ng_model_gym` at module level, which requires `pydantic`. In CI environments where these dependencies are not installed, pytest fails during test collection with `ModuleNotFoundError: No module named 'pydantic'`. This fix adds `pytest.importorskip("ng_model_gym")` before the import, which gracefully skips the entire test module when the dependency is unavailable instead of failing test collection. --- > Generated by [Confucius Code Assist (CCA)](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/) [Confucius Session](https://www.internalfb.com/confucius?host=44014.od.fbinfra.net&port=8086&tab=Chat&session_id=3841a0f6-014b-11f1-919a-6b37349122a8&entry_name=Code+Assist), [Trace](https://www.internalfb.com/confucius?session_id=3841a0f6-014b-11f1-919a-6b37349122a8&tab=Trace) Differential Revision: D92206283
apullin
pushed a commit
to apullin/executorch
that referenced
this pull request
Feb 3, 2026
…rch#17184) Summary: Fixes test collection failure in CI when `ng_model_gym` is not installed. The `test_nss.py` file imports `ng_model_gym` at module level, which requires `pydantic`. In CI environments where these dependencies are not installed, pytest fails during test collection with `ModuleNotFoundError: No module named 'pydantic'`. This fix adds `pytest.importorskip("ng_model_gym")` before the import, which gracefully skips the entire test module when the dependency is unavailable instead of failing test collection. --- > Generated by [Confucius Code Assist (CCA)](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/) [Confucius Session](https://www.internalfb.com/confucius?host=44014.od.fbinfra.net&port=8086&tab=Chat&session_id=3841a0f6-014b-11f1-919a-6b37349122a8&entry_name=Code+Assist), [Trace](https://www.internalfb.com/confucius?session_id=3841a0f6-014b-11f1-919a-6b37349122a8&tab=Trace) Differential Revision: D92206283
apullin
pushed a commit
to apullin/executorch
that referenced
this pull request
Feb 3, 2026
…rch#17184) Summary: Fixes test collection failure in CI when `ng_model_gym` is not installed. The `test_nss.py` file imports `ng_model_gym` at module level, which requires `pydantic`. In CI environments where these dependencies are not installed, pytest fails during test collection with `ModuleNotFoundError: No module named 'pydantic'`. This fix adds `pytest.importorskip("ng_model_gym")` before the import, which gracefully skips the entire test module when the dependency is unavailable instead of failing test collection. --- > Generated by [Confucius Code Assist (CCA)](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/) [Confucius Session](https://www.internalfb.com/confucius?host=44014.od.fbinfra.net&port=8086&tab=Chat&session_id=3841a0f6-014b-11f1-919a-6b37349122a8&entry_name=Code+Assist), [Trace](https://www.internalfb.com/confucius?session_id=3841a0f6-014b-11f1-919a-6b37349122a8&tab=Trace) Differential Revision: D92206283
apullin
pushed a commit
to apullin/executorch
that referenced
this pull request
Feb 3, 2026
…rch#17184) Summary: Fixes test collection failure in CI when `ng_model_gym` is not installed. The `test_nss.py` file imports `ng_model_gym` at module level, which requires `pydantic`. In CI environments where these dependencies are not installed, pytest fails during test collection with `ModuleNotFoundError: No module named 'pydantic'`. This fix adds `pytest.importorskip("ng_model_gym")` before the import, which gracefully skips the entire test module when the dependency is unavailable instead of failing test collection. --- > Generated by [Confucius Code Assist (CCA)](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/) [Confucius Session](https://www.internalfb.com/confucius?host=44014.od.fbinfra.net&port=8086&tab=Chat&session_id=3841a0f6-014b-11f1-919a-6b37349122a8&entry_name=Code+Assist), [Trace](https://www.internalfb.com/confucius?session_id=3841a0f6-014b-11f1-919a-6b37349122a8&tab=Trace) Differential Revision: D92206283
apullin
pushed a commit
to apullin/executorch
that referenced
this pull request
Feb 3, 2026
…rch#17184) Summary: Fixes test collection failure in CI when `ng_model_gym` is not installed. The `test_nss.py` file imports `ng_model_gym` at module level, which requires `pydantic`. In CI environments where these dependencies are not installed, pytest fails during test collection with `ModuleNotFoundError: No module named 'pydantic'`. This fix adds `pytest.importorskip("ng_model_gym")` before the import, which gracefully skips the entire test module when the dependency is unavailable instead of failing test collection. --- > Generated by [Confucius Code Assist (CCA)](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/) [Confucius Session](https://www.internalfb.com/confucius?host=44014.od.fbinfra.net&port=8086&tab=Chat&session_id=3841a0f6-014b-11f1-919a-6b37349122a8&entry_name=Code+Assist), [Trace](https://www.internalfb.com/confucius?session_id=3841a0f6-014b-11f1-919a-6b37349122a8&tab=Trace) Differential Revision: D92206283
…rch#17184) Summary: Fixes test collection failure in CI when `ng_model_gym` is not installed. The `test_nss.py` file imports `ng_model_gym` at module level, which requires `pydantic`. In CI environments where these dependencies are not installed, pytest fails during test collection with `ModuleNotFoundError: No module named 'pydantic'`. This fix adds `pytest.importorskip("ng_model_gym")` before the import, which gracefully skips the entire test module when the dependency is unavailable instead of failing test collection. --- > Generated by [Confucius Code Assist (CCA)](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/) [Confucius Session](https://www.internalfb.com/confucius?host=44014.od.fbinfra.net&port=8086&tab=Chat&session_id=3841a0f6-014b-11f1-919a-6b37349122a8&entry_name=Code+Assist), [Trace](https://www.internalfb.com/confucius?session_id=3841a0f6-014b-11f1-919a-6b37349122a8&tab=Trace) Differential Revision: D92206283
521504a to
3a0eb15
Compare
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.
Summary:
Fixes test collection failure in CI when
ng_model_gymis not installed.The
test_nss.pyfile importsng_model_gymat module level, which requirespydantic. In CI environments where these dependencies are not installed, pytest fails during test collection withModuleNotFoundError: No module named 'pydantic'.This fix adds
pytest.importorskip("ng_model_gym")before the import, which gracefully skips the entire test module when the dependency is unavailable instead of failing test collection.Differential Revision: D92206283