Skip to content

Move transformer models (DeepIce, GRIT) into models/transformer - #930

Merged
sevmag merged 1 commit into
graphnet-team:mainfrom
sevmag:feature/transformer-subdir
Oct 18, 2026
Merged

sevmag merged 1 commit into
graphnet-team:mainfrom
sevmag:feature/transformer-subdir

Conversation

@sevmag

@sevmag sevmag commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

What

DeepIce and GRIT are transformer architectures but lived under models/gnn. This moves them beside ISeeCube in models/transformer:

  • models/gnn/icemix.py → models/transformer/deepice.py (module renamed to match the DeepIce class)
  • models/gnn/grit.py → models/transformer/grit.py
  • models/transformer/__init__.py now exports DeepIce, GRIT, ISeeCube
  • models/gnn/__init__.py no longer exports DeepIce / GRIT

Backward compatibility

The old module paths remain as deprecation shims that re-export the class and emit a DeprecationWarning on import:

  • graphnet.models.gnn.icemix → DeepIce
  • graphnet.models.gnn.grit → GRIT

The classes themselves are unchanged, so pretrained DeepIce configs — which resolve class_name by walking graphnet.models — still load. The two training examples (06_train_icemix_model.py, 08_train_grit_model.py) now import from graphnet.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 new graphnet.models.transformer location.

🤖 Generated with Claude Code

https://claude.ai/code/session_016pqUKMMW7ZPkhc9EChzCux

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
@sevmag
sevmag merged commit cd263d2 into graphnet-team:main Oct 18, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants