-
-
Notifications
You must be signed in to change notification settings - Fork 394
Arch update 21/11 - let's simplify it a bit ;) #1346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
catalyst/contrib/data/sampler.py
Outdated
from typing import Iterator, List, Optional, Union | ||
from collections import Counter | ||
import logging | ||
from operator import itemgetter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
F401 'operator.itemgetter' imported but unused
catalyst/contrib/data/sampler.py
Outdated
import numpy as np | ||
|
||
import torch | ||
from torch.utils.data import DistributedSampler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
F401 'torch.utils.data.DistributedSampler' imported but unused
catalyst/contrib/data/sampler.py
Outdated
from torch.utils.data import DistributedSampler | ||
from torch.utils.data.sampler import BatchSampler, Sampler | ||
|
||
from catalyst.data.dataset import DatasetFromSampler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
F401 'catalyst.data.dataset.DatasetFromSampler' imported but unused
catalyst/callbacks/mixup.py
Outdated
@@ -56,7 +56,7 @@ def forward(self, x): | |||
|
|||
class SimpleDataset(torch.utils.data.Dataset): | |||
def __init__(self, train: bool = False): | |||
self.mnist = MNIST(os.getcwd(), train=train, download=True, transform=ToTensor()) | |||
self.mnist = MNIST(os.getcwd(), train=train, download=True, transform=ImageToTensor()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
E501 line too long (102 > 99 characters)
catalyst/callbacks/mixup.py
Outdated
@@ -56,7 +56,7 @@ def forward(self, x): | |||
|
|||
class SimpleDataset(torch.utils.data.Dataset): | |||
def __init__(self, train: bool = False): | |||
self.mnist = MNIST(os.getcwd(), train=train, download=True, transform=ToTensor()) | |||
self.mnist = MNIST(os.getcwd(), train=train, download=True, transform=ImageToTensor()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
W505 doc line too long (102 > 99 characters)
Returns: | ||
indices of the all elements equal x0 | ||
""" | ||
if isinstance(it, np.ndarray): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
F821 undefined name 'np'
indices of the all elements equal x0 | ||
""" | ||
if isinstance(it, np.ndarray): | ||
inds = list(np.where(it == value)[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
F821 undefined name 'np'
@@ -1,4 +1,4 @@ | |||
from typing import List, Tuple, Union | |||
from typing import Any, Iterable, List, Tuple, Union |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
F401 'typing.Any' imported but unused
@@ -1,4 +1,4 @@ | |||
from typing import List, Tuple, Union | |||
from typing import Any, Iterable, List, Tuple, Union |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
F401 'typing.Iterable' imported but unused
@@ -12,9 +12,8 @@ | |||
|
|||
from catalyst import data, dl | |||
from catalyst.callbacks.metric import BatchMetricCallback, LoaderMetricCallback | |||
from catalyst.contrib import datasets, models, nn | |||
from catalyst.contrib import data, datasets, models, nn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
F811 redefinition of unused 'data' from line 13
Pull Request FAQ
Description
Related Issue
Type of Change
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Checklist
latest
andminimal
requirements?