Skip to content

Commit

Permalink
update logging_util.py
Browse files Browse the repository at this point in the history
  • Loading branch information
qywu committed Dec 16, 2022
1 parent fe28385 commit 8548c9b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 19 deletions.
Binary file added ._environment copy.yml
Binary file not shown.
Binary file added ._environment.yml
Binary file not shown.
20 changes: 20 additions & 0 deletions environment copy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: torchfly
channels:
- defaults
- conda-forge
- pytorch
dependencies:
- pytorch
- torchvision
# - cudatoolkit=10.1
- pip:
- ray
- regex
- transformers
- colorlog
- tensorboard
- tqdm
- gdown
- scikit-learn
- overrides
- pyarrow
2 changes: 2 additions & 0 deletions torchfly/utilities/logging_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import sys
import json
import logging
import logging.config

import colorlog
from omegaconf import DictConfig

Expand Down
19 changes: 0 additions & 19 deletions tutorials/MNIST/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,6 @@ def train_loader_fn(self):
"pin_memory": True,
}
with distributed.mutex() as rank:
<<<<<<< HEAD

dataset = datasets.MNIST(os.path.join(self.config.task.datadir, 'MNIST'),
train=True,
download=True,
transform=transforms.Compose(
[transforms.ToTensor(),
transforms.Normalize((0.1307,), (0.3081,))]))


train_sampler = torch.utils.data.distributed.DistributedSampler(
dataset,
num_replicas=distributed.get_world_size(),
rank=distributed.get_rank()
)

dataloader = DataLoader(dataset, batch_size=self.config.training.batch_size, shuffle=True, **kwargs)
=======
dataset = datasets.MNIST(
os.path.join(self.config.task.datadir, "MNIST"),
train=True,
Expand All @@ -66,7 +48,6 @@ def train_loader_fn(self):
sampler=train_sampler,
**kwargs
)
>>>>>>> 636da9083aee5a710364369ba369705325db670b
return dataloader

def valid_loader_fn(self):
Expand Down

0 comments on commit 8548c9b

Please sign in to comment.