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

feat: download option and verify integrity before loading #51

Merged
merged 10 commits into from
Oct 26, 2023

Conversation

rkansal47
Copy link
Member

  • add download option for each dataset (False by default to match torchvision)
  • check integrity of dataset before loading as well
  • tests of these for all datasets

Follow-up on #49.

@jmduarte
Copy link
Member

The code looks fine, but I was wondering:
(1) why aren't the CI tests running?
(2) when I try to run tests locally on this branch (and also on main):

pytest -n 0 --durations 0 -v -m "not slow" tests/datasets/test_jetnet.py

I see the following:

================================================================== test session starts ===================================================================
platform darwin -- Python 3.10.8, pytest-7.4.2, pluggy-1.3.0 -- /opt/miniconda3/envs/jetnet/bin/python3.10
cachedir: .pytest_cache
rootdir: /Users/jduarte/Dropbox/jetnet
configfile: pyproject.toml
plugins: xdist-3.3.1
collected 15 items                                                                                                                                       

tests/datasets/test_jetnet.py::test_getData[30-g-177252-0] FAILED                                                                                  [  6%]
tests/datasets/test_jetnet.py::test_getData[30-q-170679-1] FAILED                                                                                  [ 13%]
tests/datasets/test_jetnet.py::test_getData[30-jet_types2-347931-None] FAILED                                                                      [ 20%]
tests/datasets/test_jetnet.py::test_getData[75-g-177252-0] FAILED                                                                                  [ 26%]
tests/datasets/test_jetnet.py::test_getData[75-q-170679-1] FAILED                                                                                  [ 33%]
tests/datasets/test_jetnet.py::test_getData[75-jet_types2-347931-None] FAILED                                                                      [ 40%]
tests/datasets/test_jetnet.py::test_getDataFeatures[30] FAILED                                                                                     [ 46%]
tests/datasets/test_jetnet.py::test_getDataFeatures[75] FAILED                                                                                     [ 53%]
tests/datasets/test_jetnet.py::test_getDataSplitting[30] FAILED                                                                                    [ 60%]
tests/datasets/test_jetnet.py::test_getDataSplitting[75] FAILED                                                                                    [ 66%]
tests/datasets/test_jetnet.py::test_getDataErrors FAILED                                                                                           [ 73%]
tests/datasets/test_jetnet.py::test_DataClass[30] FAILED                                                                                           [ 80%]
tests/datasets/test_jetnet.py::test_DataClass[75] FAILED                                                                                           [ 86%]
tests/datasets/test_jetnet.py::test_DataClassNormalisation[30] FAILED                                                                              [ 93%]
tests/datasets/test_jetnet.py::test_DataClassNormalisation[75] FAILED                                                                              [100%]

======================================================================== FAILURES ========================================================================

with all having a similar error message:

================================================================ short test summary info =================================================================
FAILED tests/datasets/test_jetnet.py::test_getData[30-g-177252-0] - KeyError: 'key'
FAILED tests/datasets/test_jetnet.py::test_getData[30-q-170679-1] - KeyError: 'key'
FAILED tests/datasets/test_jetnet.py::test_getData[30-jet_types2-347931-None] - KeyError: 'key'
FAILED tests/datasets/test_jetnet.py::test_getData[75-g-177252-0] - KeyError: 'key'
FAILED tests/datasets/test_jetnet.py::test_getData[75-q-170679-1] - KeyError: 'key'
FAILED tests/datasets/test_jetnet.py::test_getData[75-jet_types2-347931-None] - KeyError: 'key'
FAILED tests/datasets/test_jetnet.py::test_getDataFeatures[30] - KeyError: 'key'
FAILED tests/datasets/test_jetnet.py::test_getDataFeatures[75] - KeyError: 'key'
FAILED tests/datasets/test_jetnet.py::test_getDataSplitting[30] - KeyError: 'key'
FAILED tests/datasets/test_jetnet.py::test_getDataSplitting[75] - KeyError: 'key'
FAILED tests/datasets/test_jetnet.py::test_getDataErrors - KeyError: 'key'
FAILED tests/datasets/test_jetnet.py::test_DataClass[30] - KeyError: 'key'
FAILED tests/datasets/test_jetnet.py::test_DataClass[75] - KeyError: 'key'
FAILED tests/datasets/test_jetnet.py::test_DataClassNormalisation[30] - KeyError: 'key'
FAILED tests/datasets/test_jetnet.py::test_DataClassNormalisation[75] - KeyError: 'key'
================================================================== 15 failed in 15.01s ===================================================================

is this a known (separate) issue?

@rkansal47 rkansal47 mentioned this pull request Oct 24, 2023
@rkansal47
Copy link
Member Author

@jmduarte This was due to Zenodo updating their API last week. CI is running and passing now after #58.

@rkansal47 rkansal47 merged commit 494a7ce into jet-net:main Oct 26, 2023
12 checks passed
@rkansal47 rkansal47 deleted the checksum branch October 26, 2023 13:15
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.

3 participants