-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
tests update #1360
Conversation
catalyst/contrib/datasets/mnist.py
Outdated
@@ -1,5 +1,6 @@ | |||
from typing import Any, Callable, Dict, List, Optional | |||
from typing import Any, Callable, Dict, List, Optional, Sequence |
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.Callable' imported but unused
catalyst/contrib/datasets/mnist.py
Outdated
import os | ||
from pickle import NONE |
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 '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( |
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 🐶
D102 Missing docstring in public method
pytorch = "pytorch" | ||
|
||
|
||
class TestMnistRunner(dl.Runner): |
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 🐶
D101 Missing docstring in public class
|
||
|
||
class TestMnistRunner(dl.Runner): | ||
def get_loaders(self, stage: str) -> "OrderedDict[str, DataLoader]": |
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 🐶
D102 Missing docstring in public method
) | ||
|
||
|
||
def score_runs(irunner: dl.IRunner, mode: RunMode, num_runs: int = 10, num_epochs: int = 10): |
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 🐶
D103 Missing docstring in public function
} | ||
|
||
|
||
def assert_relative_equal(catalyst_values, torch_values, max_diff: float, norm: float = 1): |
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 🐶
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): |
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 🐶
D103 Missing docstring in public function
], | ||
) | ||
@pytest.mark.skipif(IS_BENCHMARK_REQUIRED, reason="Benchmark is not required.") | ||
def test_benchmark( |
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 🐶
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']}" |
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 (105 > 99 characters)
Hello @Scitator! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2021-11-27 08:00:42 UTC |
catalyst/contrib/datasets/mnist.py
Outdated
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 |
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 🐶
W291 trailing whitespace
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?