Reorganize bundled assets into checkpoints/ and data/ folders
Browse filesFiles changed (8)
- .gitignore+3-3
- README.md+6-6
- norm_stats_era5.npz → data/norm_stats_era5.npzRenamed
- norm_stats_hres.npz → data/norm_stats_hres.npzRenamed
- static_vars.npz → data/static_vars.npzRenamed
- era5_best.ptDeleted-3
- hres_best.ptDeleted-3
- inference.py+8-8
8 unmodified lines910111213141516178 unmodified lines# Model checkpoints are not stored in git — fetch from Hugging Face# (huggingface.co/maxxxzdn/mosaic) instead. On HF they live as LFS objects.*.pt*.pth*.ckpt# Generated forecast outputs (kept out of git but bundled .npz assets are tracked)verify_*.npz8 unmodified lines910111213141516178 unmodified lines# Model checkpoints are not stored in git — fetch from Hugging Face# (huggingface.co/maxxxzdn/mosaic) instead. On HF they live as LFS objects.checkpoints/*.ptcheckpoints/*.pthcheckpoints/*.ckpt# Generated forecast outputs (kept out of git but bundled .npz assets are tracked)verify_*.npz
111 unmodified lines11211311411511611711889 unmodified lines208209210211212213214215216217218111 unmodified lines## Getting the weightsIf you installed via Hugging Face (`huggingface-cli download maxxxzdn/mosaic --local-dir .`), the checkpoints (`era5_best.pt`, `hres_best.pt`) and normalization stats are already bundled and `inference.py` finds them in the working directory.If you cloned this repo from GitHub instead, the weights are not in the git tree (they live on the [Hugging Face mirror](https://huggingface.co/maxxxzdn/mosaic) as LFS objects). Fetch them with:89 unmodified lines| `base.py` | `WeatherModel` wrapper || `config.py` | Variable / level definitions || `dataset.py` | Metadata dataclasses || `norm_stats_era5.npz` | Normalization statistics for the `era5` variant || `norm_stats_hres.npz` | Normalization statistics for the `hres` variant || `static_vars.npz` | Static fields (orography, land–sea mask, soil type) — shared between variants || `era5_best.pt` | Trained checkpoint, `era5` variant (~1.7 GB) || `hres_best.pt` | Trained checkpoint, `hres` variant (~1.7 GB) || `figures_weather/` | Figures from the paper |## Limitations111 unmodified lines11211311411511611711889 unmodified lines208209210211212213214215216217218111 unmodified lines## Getting the weightsIf you installed via Hugging Face (`huggingface-cli download maxxxzdn/mosaic --local-dir .`), the checkpoints (`checkpoints/era5_best.pt`, `checkpoints/hres_best.pt`) and normalization stats (`data/*.npz`) are already in place and `inference.py` finds them automatically.If you cloned this repo from GitHub instead, the weights are not in the git tree (they live on the [Hugging Face mirror](https://huggingface.co/maxxxzdn/mosaic) as LFS objects). Fetch them with:89 unmodified lines| `base.py` | `WeatherModel` wrapper || `config.py` | Variable / level definitions || `dataset.py` | Metadata dataclasses || `data/norm_stats_era5.npz` | Normalization statistics for the `era5` variant || `data/norm_stats_hres.npz` | Normalization statistics for the `hres` variant || `data/static_vars.npz` | Static fields (orography, land–sea mask, soil type) — shared between variants || `checkpoints/era5_best.pt` | Trained checkpoint, `era5` variant (~1.7 GB) — Hugging Face only || `checkpoints/hres_best.pt` | Trained checkpoint, `hres` variant (~1.7 GB) — Hugging Face only || `figures_weather/` | Figures from the paper |## Limitations
123version https://git-lfs.github.com/spec/v1oid sha256:187df31a0caef3e934e4eb8a11506c9fea518ff0e02ce6d1f804fc6c8a78a940size 1713557607123version https://git-lfs.github.com/spec/v1oid sha256:6e0bc244382fa1b0f09ecdbd527c601d352cc5989697149742e8983f38a25e5esize 1714571315101 unmodified lines102103104105106107108109110111112113114115116130 unmodified lines247248249250251252253254157 unmodified lines412413414415416417418419101 unmodified linesPRESETS = {"era5": Preset(step_stride=4, num_history_steps=2, k_neighbors=24,default_checkpoint="era5_best.pt",default_norm_stats="norm_stats_era5.npz",stage_cfgs=_STAGE_CFGS_COMMON,bottleneck_cfg=_BOTTLENECK_CFG_COMMON,),"hres": Preset(step_stride=1, num_history_steps=4, k_neighbors=20,default_checkpoint="hres_best.pt",default_norm_stats="norm_stats_hres.npz",stage_cfgs=_STAGE_CFGS_COMMON,bottleneck_cfg=_BOTTLENECK_CFG_COMMON,),130 unmodified lineslongitude: np.ndarray,latitude: np.ndarray,preset: Preset,norm_stats_path: str = "norm_stats.npz",static_vars_path: str = "static_vars.npz",device: str = "cuda",):"""Build and return the WeatherModel with loaded checkpoint and metadata."""157 unmodified lineshelp="Output file path (default: forecast.npz)")parser.add_argument("--norm-stats", type=str, default=None,help="Path to norm_stats .npz. Default: preset's default_norm_stats")parser.add_argument("--static-vars", type=str, default="static_vars.npz",help="Path to static_vars.npz (default: static_vars.npz in current dir)")parser.add_argument("--k-neighbors", type=int, default=None,help="Override preset's k_neighbors (advanced — for ablation only)")parser.add_argument("--no-compile", action="store_true",101 unmodified lines102103104105106107108109110111112113114115116130 unmodified lines247248249250251252253254157 unmodified lines412413414415416417418419101 unmodified linesPRESETS = {"era5": Preset(step_stride=4, num_history_steps=2, k_neighbors=24,default_checkpoint="checkpoints/era5_best.pt",default_norm_stats="data/norm_stats_era5.npz",stage_cfgs=_STAGE_CFGS_COMMON,bottleneck_cfg=_BOTTLENECK_CFG_COMMON,),"hres": Preset(step_stride=1, num_history_steps=4, k_neighbors=20,default_checkpoint="checkpoints/hres_best.pt",default_norm_stats="data/norm_stats_hres.npz",stage_cfgs=_STAGE_CFGS_COMMON,bottleneck_cfg=_BOTTLENECK_CFG_COMMON,),130 unmodified lineslongitude: np.ndarray,latitude: np.ndarray,preset: Preset,norm_stats_path: str = "data/norm_stats_era5.npz",static_vars_path: str = "data/static_vars.npz",device: str = "cuda",):"""Build and return the WeatherModel with loaded checkpoint and metadata."""157 unmodified lineshelp="Output file path (default: forecast.npz)")parser.add_argument("--norm-stats", type=str, default=None,help="Path to norm_stats .npz. Default: preset's default_norm_stats")parser.add_argument("--static-vars", type=str, default="data/static_vars.npz",help="Path to static_vars.npz (default: data/static_vars.npz)")parser.add_argument("--k-neighbors", type=int, default=None,help="Override preset's k_neighbors (advanced — for ablation only)")parser.add_argument("--no-compile", action="store_true",
.gitignore+3-3
README.md+6-6
norm_stats_era5.npz → data/norm_stats_era5.npzRenamed
norm_stats_hres.npz → data/norm_stats_hres.npzRenamed
static_vars.npz → data/static_vars.npzRenamed
era5_best.ptDeleted-3
hres_best.ptDeleted-3
inference.py+8-8