Repository navigation
Move transformer models (DeepIce, GRIT) into models/transformer - #930
Merged
Merged
Conversation
DeepIce and GRIT are transformer architectures but lived under `models/gnn`. Move them beside `ISeeCube` in `models/transformer` (DeepIce's module renamed to `deepice.py` to match the class), and leave deprecation shims at the old `gnn.icemix` and `gnn.grit` paths that re-export the classes and warn on import. The classes themselves are unchanged, so pretrained configs -- which resolve `class_name` by walking `graphnet.models` -- still load. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016pqUKMMW7ZPkhc9EChzCux
Aske-Rosted
approved these changes
Oct 13, 2026
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
DeepIceandGRITare transformer architectures but lived undermodels/gnn. This moves them besideISeeCubeinmodels/transformer:models/gnn/icemix.py→models/transformer/deepice.py(module renamed to match theDeepIceclass)models/gnn/grit.py→models/transformer/grit.pymodels/transformer/__init__.pynow exportsDeepIce,GRIT,ISeeCubemodels/gnn/__init__.pyno longer exportsDeepIce/GRITBackward compatibility
The old module paths remain as deprecation shims that re-export the class and emit a
DeprecationWarningon import:graphnet.models.gnn.icemix→DeepIcegraphnet.models.gnn.grit→GRITThe classes themselves are unchanged, so pretrained
DeepIceconfigs — which resolveclass_nameby walkinggraphnet.models— still load. The two training examples (06_train_icemix_model.py,08_train_grit_model.py) now import fromgraphnet.models.transformer.One intentional break:
from graphnet.models.gnn import DeepIce/GRIT(the package-level re-export) no longer works; use the module path (deprecated, warns) or the newgraphnet.models.transformerlocation.🤖 Generated with Claude Code
https://claude.ai/code/session_016pqUKMMW7ZPkhc9EChzCux