Skip to content

Commit

Permalink
remove debugging statements about lsp
Browse files Browse the repository at this point in the history
  • Loading branch information
henryaddison committed Sep 18, 2024
1 parent 8ead2b6 commit 90c40ce
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/ml_downscaling_emulator/score_sde_pytorch/run_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ def train(config, workdir):

if config.training.random_crop_size > 0:
random_crop = torchvision.transforms.RandomCrop(config.training.random_crop_size)
if config.model.loc_spec_channels > 0:
before = state['location_params'].module.params[0,20,20:30].clone().detach()
for epoch in range(initial_epoch, num_train_epochs + 1):
state['epoch'] = epoch
train_set_loss = 0.0
Expand Down Expand Up @@ -227,9 +225,3 @@ def train(config, workdir):
checkpoint_path = os.path.join(checkpoint_dir, f"epoch_{state['epoch']}.pth")
save_checkpoint(checkpoint_path, state)
logging.info(f"epoch: {state['epoch']}, checkpoint saved to {checkpoint_path}")

if config.model.loc_spec_channels > 0:
after = state['location_params'].module.params[0,20,20:30].clone().detach()
logging.info(f"Before: {before}")
logging.info(f"After: {after}")
logging.info(f"Diff: {after-before}")

0 comments on commit 90c40ce

Please sign in to comment.