refactor: model class hierarchy into Forecaster/StepPredictor layers#513
refactor: model class hierarchy into Forecaster/StepPredictor layers#513parth000007 wants to merge 1 commit intomllam:mainfrom
Conversation
Refactors the monolithic ARModel class into a composable hierarchy: - ForecasterModule (pl.LightningModule): Training loop, metrics, plotting - ARForecaster (nn.Module): Auto-regressive unrolling - StepPredictor (nn.Module): Single-step prediction interface - BaseGraphModel inherits StepPredictor instead of ARModel This separation enables: - Non-autoregressive forecasters - New step predictor architectures (e.g. Vision Transformers) - Ensemble strategies without modifying training infrastructure Also fixes two pre-existing bugs: - interior_mask_bool shape (1,) → (N,) for correct loss masking - all_gather_cat dimension collapse on single-device runs Refs mllam#49 Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
|
hi @j6k4m8 @leifdenby @kshirajahere can you please check this PR its benefits it attach here by:- |
|
Hey @parth000007 there is an issue with the PR description it has parts of the placeholder of template, please get rid of them.. |
There was a problem hiding this comment.
The PR is undoing some recent changes
There was a problem hiding this comment.
EDIT : Meant to tag ./Agents.md
|
Hi @parth000007, I noticed this PR overlaps significantly with #208 which covers the same ARModel → ForecasterModule/ARForecaster/StepPredictor refactor and is currently under review. Could you clarify how this differs or if it was intended to supersede #208? cc @joeloskarsson @sadamov @leifdenby @observingClouds |
| uses: astral-sh/setup-uv@v7 | ||
| - name: Build with uv | ||
| run: uv build | ||
| - uses: actions/setup-python@v5 |
There was a problem hiding this comment.
I cannot understand why we have to do this ?
| f"SLURM_JOB_NODELIST is set to {repr(nodelist)}, but " | ||
| "'scontrol show hostnames' returned no hostnames. " | ||
| "Please check your SLURM job configuration." | ||
| master_node = ( |
There was a problem hiding this comment.
i think the previous version provided more security against a command injection vulnerability
|
@parth000007 such a massive PR certainly warrants some discussion in #49 before implementation. Especially why you think we need another approach to #208. I'd ask you to contribute to #208 instead and introduce your ideas through code reviews, comments or PRs into that branch instead. thanks! |
Refactors the monolithic ARModel class into a composable hierarchy:
This separation enables:
Also fixes two pre-existing bugs:
Refs #49
Describe your changes
< Summary of the changes.>
< Please also include relevant motivation and context. >
< List any dependencies that are required for this change. >
Issue Link
Type of change
Checklist before requesting a review
pullwith--rebaseoption if possible).Checklist for reviewers
Each PR comes with its own improvements and flaws. The reviewer should check the following:
Author checklist after completed review
reflecting type of change (add section where missing):
Checklist for assignee