Skip to content

[POC] Base class for dataset tests #3402

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 30 commits into from
Feb 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
aba8779
add base class for datasets tests
pmeier Feb 15, 2021
fd8d48a
add better type hints
pmeier Feb 15, 2021
cb29187
add documentation to subclasses
pmeier Feb 15, 2021
11b27e4
add utility functions to create files / folders of random images and …
pmeier Feb 15, 2021
3115e1a
fix imports
pmeier Feb 15, 2021
5f32d77
remove class properties
pmeier Feb 15, 2021
2cc4d77
fix smoke test
pmeier Feb 15, 2021
2964577
fix type hints
pmeier Feb 15, 2021
5993f8c
fix random size generation
pmeier Feb 15, 2021
8dca6e4
add Caltech256 as example
pmeier Feb 15, 2021
37eeff7
add utility function to create grid of combinations
pmeier Feb 15, 2021
a9526e1
add CIFAR100? as example
pmeier Feb 15, 2021
857c5a8
lint
pmeier Feb 15, 2021
e85f996
add missing import
pmeier Feb 16, 2021
5ecd061
improve documentation
pmeier Feb 16, 2021
1175a32
create 1 frame videos by default
pmeier Feb 16, 2021
d164ea9
remove obsolete check
pmeier Feb 16, 2021
9cadab1
return path of files created with utility functions
pmeier Feb 16, 2021
77fa716
[test] close PIL file handles before deletion
pmeier Feb 16, 2021
c2b3b0a
fix video folder creation
pmeier Feb 16, 2021
6f05ca0
generalize file handle closing
pmeier Feb 16, 2021
d3f9268
fix lazy imports
pmeier Feb 17, 2021
e7d1675
add test for transforms
pmeier Feb 17, 2021
0662533
fix explanation comment
pmeier Feb 17, 2021
9773089
lint
pmeier Feb 17, 2021
c517a5a
force load opened PIL images
pmeier Feb 17, 2021
4c1ff7c
lint
pmeier Feb 17, 2021
170f700
copy default config to avoid inplace modification
pmeier Feb 17, 2021
aba3ee0
enable additional arg forwarding
pmeier Feb 17, 2021
3315ae5
Merge branch 'master' into improve-datasets-testing
pmeier Feb 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions test/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,3 +393,11 @@ def int_dtypes():

def float_dtypes():
return torch.testing.floating_types()


@contextlib.contextmanager
def disable_console_output():
with contextlib.ExitStack() as stack, open(os.devnull, "w") as devnull:
stack.enter_context(contextlib.redirect_stdout(devnull))
stack.enter_context(contextlib.redirect_stderr(devnull))
yield
Loading