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

Add debug mode tutorial notebook #3648

Merged
merged 8 commits into from
Feb 11, 2022

Conversation

ksztenderski
Copy link
Contributor

@ksztenderski ksztenderski commented Jan 27, 2022

Signed-off-by: ksztenderski ksztenderski@nvidia.com

Category:

Other (e.g. Documentation, Tests, Configuration)

Description:

Add tutorial jupyter notebook showing use cases and features of debug mode.

Additional information:

Affected modules and functionalities:

Key points relevant for the review:

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

@ksztenderski
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3840125]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3840132]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3840166]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3840166]: BUILD FAILED

@ksztenderski
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3846256]: BUILD STARTED

@review-notebook-app
Copy link

review-notebook-app bot commented Jan 28, 2022

View / edit / reply to this conversation on ReviewNB

klecki commented on 2022-01-28T11:21:48Z
----------------------------------------------------------------

Maybe we can link to the DataNode doc: https://docs.nvidia.com/deeplearning/dali/user-guide/docs/pipeline.html#datanode

And/or mention the fact that we are talking about the outputs of operators? I guess not many people know what the DataNode is in DALI.


ksztenderski commented on 2022-01-28T17:29:36Z
----------------------------------------------------------------

done

@review-notebook-app
Copy link

review-notebook-app bot commented Jan 28, 2022

View / edit / reply to this conversation on ReviewNB

klecki commented on 2022-01-28T11:21:49Z
----------------------------------------------------------------

Maybe we should add one sentence about why we need to change to the experimental.pipeline_def, or that apart from allowing us to turn on the debug mode it is basically the same as the old one.

Also I would add a filler sentence like:

Let's take a simple pipeline that reads images and rotates them and try out the debug mode on it.


ksztenderski commented on 2022-01-28T17:29:53Z
----------------------------------------------------------------

done

@review-notebook-app
Copy link

review-notebook-app bot commented Jan 28, 2022

View / edit / reply to this conversation on ReviewNB

klecki commented on 2022-01-28T11:21:50Z
----------------------------------------------------------------

Line #2.    def simple_pipeline():

Maybe

def simple_pipeline_with_print

?


ksztenderski commented on 2022-01-28T17:31:28Z
----------------------------------------------------------------

done

@review-notebook-app
Copy link

review-notebook-app bot commented Jan 28, 2022

View / edit / reply to this conversation on ReviewNB

klecki commented on 2022-01-28T11:21:51Z
----------------------------------------------------------------

I think that is worth to summarize that there would be difference in running that pipeline in debug and non-debug mode:

  • in debug mode the print happens in every run()
  • in regular mode it happens during build() only once

Maybe it is worth to highlight the fact that in debug mode, we can see the operators executed one by one in Python, when we call run() as opposed to scheduling the execution of the graph in backend.


ksztenderski commented on 2022-01-28T17:37:03Z
----------------------------------------------------------------

done

@review-notebook-app
Copy link

review-notebook-app bot commented Jan 28, 2022

View / edit / reply to this conversation on ReviewNB

klecki commented on 2022-01-28T11:21:52Z
----------------------------------------------------------------

Should we say that it gives the access to the TensorListCPU/GPU for the current iteration?


ksztenderski commented on 2022-01-28T17:37:10Z
----------------------------------------------------------------

done

@review-notebook-app
Copy link

review-notebook-app bot commented Jan 28, 2022

View / edit / reply to this conversation on ReviewNB

klecki commented on 2022-01-28T11:21:53Z
----------------------------------------------------------------

I would maybe expand it a bit, and say how we can modify the data? And what format do they expect?


ksztenderski commented on 2022-01-28T17:37:35Z
----------------------------------------------------------------

done

@klecki
Copy link
Contributor

klecki commented Jan 28, 2022

Also I would add a section about limitations:

  • mention the speed impact,
  • mention the seeds - it can have different results than regular pipeline,
  • mention the execution order
  • anything else?

We should also clearly state somewhere, that those operators work only in a scope of the pipeline_def and one cannot use them in numpy style for eager execution.

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3846256]: BUILD PASSED

@review-notebook-app
Copy link

View / edit / reply to this conversation on ReviewNB

JanuszL commented on 2022-01-28T13:45:27Z
----------------------------------------------------------------

I think we should stress out the performance implication.

> This allows for better performanc

Sound like it the graph mode is just a bit faster. I would say that in this mode the execution is expected to be slow, is not intended to be used in production code nor for benchmarking. Maybe you can even write that it is equivalent to creating a separate pipeline for each operator and running it synchronously one by one.


Copy link
Contributor Author

done


View entire conversation on ReviewNB

5 similar comments
Copy link
Contributor Author

done


View entire conversation on ReviewNB

Copy link
Contributor Author

done


View entire conversation on ReviewNB

Copy link
Contributor Author

done


View entire conversation on ReviewNB

Copy link
Contributor Author

done


View entire conversation on ReviewNB

Copy link
Contributor Author

done


View entire conversation on ReviewNB

@ksztenderski
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3848351]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3848351]: BUILD FAILED

@ksztenderski
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3857453]: BUILD STARTED

@ksztenderski ksztenderski force-pushed the debug_mode_tutorial_notebook branch from 44b0505 to 0bb1bd7 Compare February 9, 2022 09:55
@ksztenderski
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3924231]: BUILD STARTED

Copy link
Contributor

JanuszL commented Feb 9, 2022

Maybe in the first example it can stay cpu and add mixed in the simple_pipeline_with_print with a note in the text that it works for GPU as well.


View entire conversation on ReviewNB

@review-notebook-app
Copy link

View / edit / reply to this conversation on ReviewNB

JanuszL commented on 2022-02-09T10:34:52Z
----------------------------------------------------------------

I think you should better print images not jpegs here.


Copy link
Contributor Author

Done, but I'm guessing that you might also wanted it to show print on TensorListGPU, but I intentionally printed jpegs here so it would take less space.


View entire conversation on ReviewNB

Copy link
Contributor

JanuszL commented Feb 9, 2022

Up to you.


View entire conversation on ReviewNB

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3924231]: BUILD FAILED

@JanuszL JanuszL self-assigned this Feb 9, 2022
Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
@ksztenderski ksztenderski force-pushed the debug_mode_tutorial_notebook branch from ad7ea79 to 532b0de Compare February 9, 2022 16:07
@ksztenderski
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3926081]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3926081]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3926081]: BUILD PASSED

@ksztenderski ksztenderski merged commit 6123a36 into NVIDIA:main Feb 11, 2022
cyyever pushed a commit to cyyever/DALI that referenced this pull request Feb 21, 2022
Also add notice to the documentation about debug mode

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
@JanuszL JanuszL mentioned this pull request Mar 30, 2022
cyyever pushed a commit to cyyever/DALI that referenced this pull request May 13, 2022
Also add notice to the documentation about debug mode

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jun 7, 2022
Also add notice to the documentation about debug mode

Signed-off-by: ksztenderski <ksztenderski@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.

5 participants