Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
sadamov committed May 25, 2024
1 parent ec796cb commit ea43435
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
19 changes: 6 additions & 13 deletions neural_lam/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,6 @@ def fractional_plot_bundle(fraction):
return bundle


def init_wandb_metrics(wandb_logger, val_steps):
"""
Set up wandb metrics to track
"""



@rank_zero_only
def rank_zero_print(*args, **kwargs):
"""Print only from rank 0 process"""
Expand All @@ -290,30 +283,30 @@ def init_wandb(args):
)
wandb.init(
name=run_name,
project=constants.WANDB_PROJECT,
project=args.wandb_project,
config=args,
)
logger = pl.loggers.WandbLogger(
project=constants.WANDB_PROJECT,
project=args.wandb_project,
name=run_name,
config=args,
)
wandb.save("neural_lam/constants.py")
wandb.save("neural_lam/data_config.yaml")
else:
wandb.init(
project=constants.WANDB_PROJECT,
project=args.wandb_project,
config=args,
id=args.resume_run,
resume="must",
)
logger = pl.loggers.WandbLogger(
project=constants.WANDB_PROJECT,
project=args.wandb_project,
id=args.resume_run,
config=args,
)
experiment = logger.experiment
experiment.define_metric("val_mean_loss", summary="min")
for step in val_steps:
for step in args.val_steps_to_log:
experiment.define_metric(f"val_loss_unroll{step}", summary="min")

return logger
1 change: 0 additions & 1 deletion train_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from lightning_fabric.utilities import seed

# First-party
from neural_lam import utils
from neural_lam import config, utils
from neural_lam.models.graph_lam import GraphLAM
from neural_lam.models.hi_lam import HiLAM
Expand Down

0 comments on commit ea43435

Please sign in to comment.