Skip to content
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

tests update #1360

Merged
merged 7 commits into from
Nov 27, 2021
Merged

tests update #1360

merged 7 commits into from
Nov 27, 2021

Conversation

Scitator
Copy link
Member

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?

@@ -1,5 +1,6 @@
from typing import Any, Callable, Dict, List, Optional
from typing import Any, Callable, Dict, List, Optional, Sequence

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.Callable' imported but unused

import os
from pickle import NONE

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 'pickle.NONE' imported but unused

@@ -139,15 +142,23 @@ def __repr__(self):
lines = [head] + [" " * self._repr_indent + line for line in body]
return "\n".join(lines)

@staticmethod
def normalize_tensor(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
D102 Missing docstring in public method

pytorch = "pytorch"


class TestMnistRunner(dl.Runner):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
D101 Missing docstring in public class



class TestMnistRunner(dl.Runner):
def get_loaders(self, stage: str) -> "OrderedDict[str, DataLoader]":

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
D102 Missing docstring in public method

)


def score_runs(irunner: dl.IRunner, mode: RunMode, num_runs: int = 10, num_epochs: int = 10):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
D103 Missing docstring in public function

}


def assert_relative_equal(catalyst_values, torch_values, max_diff: float, norm: float = 1):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
D103 Missing docstring in public function

), f"Catalyst diff {diffs} worse than PyTorch (threshold {max_diff})"


def assert_absolute_equal(catalyst_values, torch_values, max_diff: float, norm: float = 1):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
D103 Missing docstring in public function

],
)
@pytest.mark.skipif(IS_BENCHMARK_REQUIRED, reason="Benchmark is not required.")
def test_benchmark(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
D103 Missing docstring in public function

# check memory
if torch.cuda.is_available():
print(
f"Memory usages are for... \n PyTorch: {pytorch['memory']} \n Catalyst: {catalyst['memory']}"

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 (105 > 99 characters)

@pep8speaks
Copy link

pep8speaks commented Nov 27, 2021

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

Line 245:100: E501 line too long (105 > 99 characters)

Comment last updated at 2021-11-27 08:00:42 UTC

download (bool, optional): If true, downloads the dataset from
the internet and puts it in root directory. If dataset
is already downloaded, it is not downloaded again.
normalize (tuple, optional): mean and std

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
W291 trailing whitespace

@Scitator Scitator merged commit 55a3a55 into master Nov 27, 2021
@mergify mergify bot deleted the tests-update branch November 27, 2021 08:36
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