Skip to content

Commit

Permalink
fix more linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jarlsondre committed Oct 30, 2024
1 parent d4ed0ae commit 2bfb939
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 32 deletions.
2 changes: 1 addition & 1 deletion src/itwinai/torch/monitoring/plotting.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Tuple, List
from typing import Tuple

import matplotlib
import matplotlib.pyplot as plt
Expand Down
17 changes: 7 additions & 10 deletions tutorials/distributed-ml/torch-scaling-test/ddp_trainer.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
"""
Scaling test of torch Distributed Data Parallel on Imagenet using Resnet.
"""
from typing import Optional
import argparse
import sys
import os
from timeit import default_timer as timer
import sys
import time
from timeit import default_timer as timer
from typing import Optional

import torch
import torch.distributed as dist
import torch.nn as nn
import torch.nn.functional as F
import torchvision
from torch.utils.data import DataLoader
from torch.utils.data.distributed import DistributedSampler
import torchvision
from utils import imagenet_dataset

from itwinai.parser import ArgumentParser as ItAIArgumentParser
from itwinai.loggers import EpochTimeTracker
from itwinai.torch.reproducibility import (
seed_worker, set_seed
)

from utils import imagenet_dataset
from itwinai.parser import ArgumentParser as ItAIArgumentParser
from itwinai.torch.reproducibility import seed_worker, set_seed


def parse_params():
Expand Down
19 changes: 8 additions & 11 deletions tutorials/distributed-ml/torch-scaling-test/deepspeed_trainer.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
"""
Scaling test of Microsoft Deepspeed on Imagenet using Resnet.
"""
from typing import Optional
import argparse
import sys
import os
from timeit import default_timer as timer
import sys
import time
import deepspeed
from timeit import default_timer as timer
from typing import Optional

import deepspeed
import torch
import torch.distributed as dist
import torch.nn.functional as F
import torchvision
from torch.utils.data import DataLoader
from torch.utils.data.distributed import DistributedSampler
import torchvision
from utils import imagenet_dataset

from itwinai.parser import ArgumentParser as ItAIArgumentParser
from itwinai.loggers import EpochTimeTracker
from itwinai.torch.reproducibility import (
seed_worker, set_seed
)

from utils import imagenet_dataset
from itwinai.parser import ArgumentParser as ItAIArgumentParser
from itwinai.torch.reproducibility import seed_worker, set_seed


def parse_params():
Expand Down
18 changes: 8 additions & 10 deletions tutorials/distributed-ml/torch-scaling-test/horovod_trainer.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
"""
Scaling test of Horovod on Imagenet using Resnet.
"""
from typing import Optional
import argparse
import os
import sys
from timeit import default_timer as timer
import time
from timeit import default_timer as timer
from typing import Optional

import horovod.torch as hvd
import torch

# import torch.multiprocessing as mp
import torch.nn.functional as F
import torch.optim as optim
import torchvision
from torch.utils.data import DataLoader
from torch.utils.data.distributed import DistributedSampler
import horovod.torch as hvd
import torchvision
from utils import imagenet_dataset

from itwinai.parser import ArgumentParser as ItAIArgumentParser
from itwinai.loggers import EpochTimeTracker
from itwinai.torch.reproducibility import (
seed_worker, set_seed
)

from utils import imagenet_dataset
from itwinai.parser import ArgumentParser as ItAIArgumentParser
from itwinai.torch.reproducibility import seed_worker, set_seed


def parse_params():
Expand Down

0 comments on commit 2bfb939

Please sign in to comment.