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

Use index slicing in geometric transformation notebook #3635

Merged

Conversation

jantonguirao
Copy link
Contributor

Signed-off-by: Joaquin Anton janton@nvidia.com

Description

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (Redesign of existing code that doesn't affect functionality)
  • Other (e.g. Documentation, Tests, Configuration)

What happened in this PR

Updates geometric transformation notebook to showcase index slicing

Additional information

  • Affected modules and functionalities:

NA

  • Key points relevant for the review:

NA

Checklist

Tests

  • Existing tests apply
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jantonguirao jantonguirao force-pushed the index_slice_in_geometric_notebook branch 2 times, most recently from 8ccb4ce to 4422f0c Compare January 21, 2022 16:37
Signed-off-by: Joaquin Anton <janton@nvidia.com>
@jantonguirao jantonguirao force-pushed the index_slice_in_geometric_notebook branch from 4422f0c to db5130d Compare January 21, 2022 16:41
Signed-off-by: Joaquin Anton <janton@nvidia.com>
@JanuszL JanuszL self-assigned this Jan 24, 2022
@review-notebook-app
Copy link

View / edit / reply to this conversation on ReviewNB

JanuszL commented on 2022-01-24T11:10:02Z
----------------------------------------------------------------

Line #2.    import nvidia.dali as dali

I think this line can be removed.


@review-notebook-app
Copy link

View / edit / reply to this conversation on ReviewNB

JanuszL commented on 2022-01-24T11:10:03Z
----------------------------------------------------------------

Line #2.    def pipe0():

How about basic_pipeline ?


@review-notebook-app
Copy link

View / edit / reply to this conversation on ReviewNB

JanuszL commented on 2022-01-24T11:10:04Z
----------------------------------------------------------------

Line #2.    def pipe1():

basic_pipe_with_transforms


@review-notebook-app
Copy link

review-notebook-app bot commented Jan 24, 2022

View / edit / reply to this conversation on ReviewNB

JanuszL commented on 2022-01-24T11:10:05Z
----------------------------------------------------------------

Line #3.        jpegs, _ = fn.readers.file(file_root=root_dir, files=image_files)

Maybe you can call pipe0 here to reuse this part of the pipeline.

I would check if it is possible to apply similar reusing in other paragraphs.


jantonguirao commented on 2022-01-24T13:22:38Z
----------------------------------------------------------------

I can't reuse the basic pipe because the moment I decorate it with pipeline def it produces a pipeline object. I don't think than extracting a function to be used in basic pipe and in the following will help the reader much here. I'd rather repeat those couple of lines in every pipeline for the sake of simplicity

@review-notebook-app
Copy link

View / edit / reply to this conversation on ReviewNB

JanuszL commented on 2022-01-24T11:10:06Z
----------------------------------------------------------------

Line #4.        return fn.stack(w, h, axis=0)        # ...and concatenate

 return fn.stack(w, h)    # ...and concatenate

Maybe we can relay on the default for the simplicity?


@review-notebook-app
Copy link

View / edit / reply to this conversation on ReviewNB

JanuszL commented on 2022-01-24T11:10:07Z
----------------------------------------------------------------

Line #7.    def pipe2():

centered_rotation_pipe


@review-notebook-app
Copy link

View / edit / reply to this conversation on ReviewNB

JanuszL commented on 2022-01-24T11:10:07Z
----------------------------------------------------------------

Line #2.    def pipe3():

multiple_transform_pipe


@review-notebook-app
Copy link

View / edit / reply to this conversation on ReviewNB

JanuszL commented on 2022-01-24T11:10:08Z
----------------------------------------------------------------

Line #2.    def pipe4():

combine_pipeline


@review-notebook-app
Copy link

View / edit / reply to this conversation on ReviewNB

JanuszL commented on 2022-01-24T11:10:09Z
----------------------------------------------------------------

Line #2.    def pipe5():

crop_pipeline


@review-notebook-app
Copy link

View / edit / reply to this conversation on ReviewNB

JanuszL commented on 2022-01-24T11:10:10Z
----------------------------------------------------------------

Line #2.    def pipe6():

galery_pipe


Copy link
Contributor Author

I can't reuse the basic pipe because the moment I decorate it with pipeline def it produces a pipeline object. I don't think than extracting a function to be used in basic pipe and in the following will help the reader much here. I'd rather repeat those couple of lines in every pipeline for the sake of simplicity


View entire conversation on ReviewNB

Signed-off-by: Joaquin Anton <janton@nvidia.com>
@jantonguirao
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3831984]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3831984]: BUILD PASSED

@jantonguirao jantonguirao merged commit c4c9ba8 into NVIDIA:main Jan 27, 2022
cyyever pushed a commit to cyyever/DALI that referenced this pull request Feb 21, 2022
Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request May 13, 2022
Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jun 7, 2022
Signed-off-by: Joaquin Anton <janton@nvidia.com>
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.

4 participants