mllam / neural-lam

Neural Weather Prediction for Limited Area Modeling
MIT License
64 stars 24 forks source link

Add Rank-Zero Printing and Improve Wandb Initialization #16

Open sadamov opened 1 month ago

sadamov commented 1 month ago

Description: This PR introduces rank_zero_print and init_wandb utility functions to enhance printing behavior in multi-process environments and streamline Weights and Biases (wandb) initialization for logging and experiment tracking.

Changes:

Benefits:

sadamov commented 1 month ago

Okay I requested another review, and from my side this PR should be ready for merge.

sadamov commented 3 weeks ago

@joeloskarsson the issue was that wandb is only initialized once the trainer.fit() started. So a nice way to solve this issue is: removing the wandb.init() as you suggested and then saving the configs in the ar_model:

    def on_run_end(self):
        if self.trainer.is_global_zero:
            wandb.save("neural_lam/data_config.yaml")
sadamov commented 3 weeks ago

@leifdenby can I add this PR to the roadmap for v.0.2.0? and then add it as a feature to the changelog as well?