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

Numpy reader devel #1858

Merged
merged 27 commits into from
Apr 10, 2020
Merged

Numpy reader devel #1858

merged 27 commits into from
Apr 10, 2020

Conversation

azrael417
Copy link
Contributor

Why we need this PR?

  • It adds a native reader for standard .npy (NumPy) files. Currently only supports non-pickled files and no .npz yet.

What happened in this PR?

Fill relevant points, put NA otherwise. Replace anything inside []

  • What solution was applied:
    [ Added numpy_file_reader and -loader ]
  • Affected modules and functionalities:
    [ dali/operators/reader ]
  • Key points relevant for the review:
    [ updated Dockerfile.deps with updated boost mirror, renaming of FIleLoader to FileLabelLoader (and the corresponding files, i.e. renamed file_loader. to file_label_loader.* and added file_loader.* with the new definition) in Dali/operators/reader/loader, numpy_loader.* and numpy_reader_op.* in the reader directory, inlined a few helper functions in dali/kernels/common/transpose.h, the header contained implementations which caused linking errors ]*
  • Validation and testing:
    [ I ran the test suite for the existing operators and added a test for the numpy reader under dali/test/python. It basically creates a numpy file and loads it the regular way and also using the loader and compares the output]
  • Documentation (including examples):
    [ No, nothing did change. I am happy to add a doc item for the reader though in case it is requested. ]

JIRA TASK: [ NA ]

docker/Dockerfile.deps Outdated Show resolved Hide resolved
@JanuszL
Copy link
Contributor

JanuszL commented Apr 3, 2020

Some Jupyter example would be nice to show how it can be used.

@JanuszL
Copy link
Contributor

JanuszL commented Apr 3, 2020

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [1239650]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [1239650]: BUILD PASSED

@JanuszL
Copy link
Contributor

JanuszL commented Apr 8, 2020

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [1243203]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [1243203]: BUILD FAILED

// extract header length
uint16_t header_len = 0;
memcpy(&header_len, &token[8], 2);
DALI_ENFORCE(header_len % 16 == 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

It fails in tests...

…ength being integer multiples of 16, header-length+10 has to be modulo 16. Fixed
@JanuszL
Copy link
Contributor

JanuszL commented Apr 9, 2020

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [1244701]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [1244701]: BUILD PASSED

@JanuszL JanuszL merged commit 2c09574 into NVIDIA:master Apr 10, 2020
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.

5 participants