Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-water committed Oct 2, 2024
1 parent 02679a6 commit df6e196
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion notebooks/camera_ready/corrupt_data/pretrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import lightning.pytorch as pl
import torch
import wandb
from lightning.fabric.strategies import XLAFSDPStrategy

import wandb
from sdofm import utils
from sdofm.datasets import (BrightSpotsSDOMLDataModule,
HelioProjectedSDOMLDataModule, SDOMLDataModule)
Expand Down
2 changes: 1 addition & 1 deletion notebooks/camera_ready/instrument_degrad/pretrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import lightning.pytorch as pl
import torch
import wandb
from lightning.fabric.strategies import XLAFSDPStrategy

import wandb
from sdofm import utils
from sdofm.datasets import (BrightSpotsSDOMLDataModule,
HelioProjectedSDOMLDataModule, SDOMLDataModule)
Expand Down
2 changes: 1 addition & 1 deletion notebooks/camera_ready/virtual_eve/pretrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import lightning.pytorch as pl
import torch
import wandb
from lightning.fabric.strategies import XLAFSDPStrategy

import wandb
from sdofm import utils
from sdofm.datasets import (BrightSpotsSDOMLDataModule,
HelioProjectedSDOMLDataModule, SDOMLDataModule)
Expand Down
2 changes: 1 addition & 1 deletion scripts/ablation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import lightning.pytorch as pl
import torch

import wandb

from sdofm import utils
from sdofm.ablation import AblationAutocalibration
from sdofm.datasets import DegradedSDOMLDataModule, SDOMLDataModule
Expand Down
2 changes: 1 addition & 1 deletion scripts/finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import lightning.pytorch as pl
import torch

import wandb

from sdofm import utils
from sdofm.datasets import DegradedSDOMLDataModule, SDOMLDataModule
from sdofm.finetuning import Autocalibration, VirtualEVE
Expand Down
2 changes: 1 addition & 1 deletion scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
import hydra
import numpy as np
import torch
import wandb
from lightning.pytorch import seed_everything
from lightning.pytorch.loggers.wandb import WandbLogger
from omegaconf import DictConfig, OmegaConf

import wandb
from sdofm import utils # import days_hours_mins_secs_str
from sdofm.utils import flatten_dict

Expand Down
2 changes: 1 addition & 1 deletion scripts/main_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
import hydra
import numpy as np
import tensorflow as tf
import wandb
# from lightning.pytorch import seed_everything
# from lightning.pytorch.loggers.wandb import WandbLogger
from omegaconf import DictConfig, OmegaConf

import wandb
from sdofm import utils # import days_hours_mins_secs_str
from sdofm.utils import flatten_dict

Expand Down
2 changes: 1 addition & 1 deletion scripts/pretrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import lightning.pytorch as pl
import torch
import wandb
from lightning.fabric.strategies import XLAFSDPStrategy

import wandb
from sdofm import utils
from sdofm.datasets import (BrightSpotsSDOMLDataModule,
HelioProjectedSDOMLDataModule,
Expand Down
3 changes: 1 addition & 2 deletions sdofm/models/wrap_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
import segmentation_models_pytorch as smp
import torch
import torch.nn as nn
import wandb
from einops import rearrange
from omegaconf import DictConfig, OmegaConf
from segmentation_models_pytorch import Unet
from segmentation_models_pytorch.decoders.unet.decoder import UnetDecoder

import wandb

from .. import utils
from . import ConvTransformerTokensToEmbeddingNeck, MaskedAutoencoderViT3D

Expand Down
3 changes: 1 addition & 2 deletions sdofm/pretraining/MAE.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,8 @@ def on_validation_epoch_end(self):
batch_metrics = bench_recon.mean_metrics(merged_metrics)

if isinstance(self.logger, pl.loggers.wandb.WandbLogger):
from pandas import DataFrame

import wandb
from pandas import DataFrame

# this only occurs on rank zero only
df = DataFrame(batch_metrics)
Expand Down
1 change: 0 additions & 1 deletion sdofm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import numpy as np
import torch

import wandb


Expand Down

0 comments on commit df6e196

Please sign in to comment.