Run on a mac the climax inference #58
Open
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.
This pull request focuses on improving compatibility and usability for running ClimaX regional forecasting on Apple Silicon (macOS), adds predict-only demo scripts, and updates configuration and documentation to make experimentation easier. The main changes include adjustments to the training configuration for macOS, the addition of demo scripts for inference, enhancements to training script compatibility across Lightning versions, and expanded documentation for setup and usage.
Apple Silicon/macOS compatibility & configuration updates:
configs/regional_forecast_climax.yaml
to use"mps"
accelerator, full precision (precision: 32-true
), and macOS-friendly data paths and batch sizes; also disables problematic features for Apple Silicon and streamlines checkpoint and logging settings. [1] [2] [3] [4] [5] [6]Predict-only and demo scripts:
predict_only_climax.py
anddemo_compare_resolutions.py
scripts to perform inference with pretrained ClimaX models, including side-by-side resolution comparison and support for macOS/MPS. These scripts provide dummy input generation, flexible variable selection, and output visualization. [1] [2]Training script compatibility and robustness:
src/climax/regional_forecast/train.py
to support both old and new Lightning import paths, handle config saving robustly, and ensure model/data module wiring works across Lightning versions. [1] [2]Documentation and reproducibility:
output/README.md
with step-by-step setup instructions, dependency list, and usage examples for both demo and predict-only scripts, improving onboarding and reproducibility for new users.Minor code quality improvements:
src/climax/utils/pos_embed.py
to use standard Python types (float
instead ofnp.float
) for better compatibility and future-proofing. [1] [2]Run
Download Weights: https://huggingface.co/microsoft/ClimaX/tree/main