Skip to content

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

Merged
merged 18 commits into from
Nov 7, 2021
Merged

Conversation

Scitator
Copy link
Member

@Scitator Scitator commented Nov 5, 2021

Pull Request FAQ

Description

Related Issue

Type of Change

  • Examples / docs / tutorials / contributors update
  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves an existing feature)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to 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

  • Have you updated tests for the new functionality?
  • Have you added your new classes/functions to the docs?
  • Have you updated the CHANGELOG?
  • Have you run colab minimal CI/CD with latest and minimal requirements?
  • Have you checked XLA integration with single and multiple processes?

@Scitator Scitator requested review from bagxi and ditwoo as code owners November 5, 2021 07:56
from typing import Iterator, List, Optional, Union
from collections import Counter
import logging
from operator import itemgetter
Copy link

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

import numpy as np

import torch
from torch.utils.data import DistributedSampler
Copy link

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

from torch.utils.data import DistributedSampler
from torch.utils.data.sampler import BatchSampler, Sampler

from catalyst.data.dataset import DatasetFromSampler
Copy link

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

@pep8speaks
Copy link

pep8speaks commented Nov 5, 2021

Hello @Scitator! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-11-07 08:23:12 UTC

@@ -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())
Copy link

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)

@@ -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())
Copy link

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):
Copy link

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])
Copy link

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
Copy link

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
Copy link

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
Copy link

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

@Scitator Scitator merged commit 809cd22 into master Nov 7, 2021
@mergify mergify bot deleted the arch-update-2111 branch November 7, 2021 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants