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

Updates the pipeline docs page #2824

Merged
merged 2 commits into from
Apr 1, 2021

Conversation

JanuszL
Copy link
Contributor

@JanuszL JanuszL commented Mar 29, 2021

  • removes duplicated pipeline description from the pipeline docs page
  • makes Pipeline.current() method documented
  • adds an example of how to use Pipeline.current() in the Pipeline Decorator
    section

Signed-off-by: Janusz Lisiecki jlisiecki@nvidia.com

Why we need this PR?

Pick one, remove the rest

  • It updates the pipeline docs page

What happened in this PR?

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

  • What solution was applied:
    removes duplicated pipeline description from the pipeline docs page
    makes Pipeline.current() method documented
    adds an example of how to use Pipeline.current() in the Pipeline Decorator
    section
  • Affected modules and functionalities:
    pipeline docs page
  • Key points relevant for the review:
    Wording in the example
  • Validation and testing:
    CI
  • Documentation (including examples):
    Pipeline doc page was updated

JIRA TASK: [NA]

- removes duplicated pipeline description from the pipeline docs page
- makes Pipeline.current() method documented
- adds an example of how to use Pipeline.current() in the Pipeline Decorator
  section

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL
Copy link
Contributor Author

JanuszL commented Mar 29, 2021

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2214847]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2214847]: BUILD PASSED

Comment on lines 1279 to 1280
To obtain a value of the argument added and consumed by the ``@pipeline_def`` the user need to
to use :meth:`nvidia.dali.Pipeline.current()` and query for the required value::
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
To obtain a value of the argument added and consumed by the ``@pipeline_def`` the user need to
to use :meth:`nvidia.dali.Pipeline.current()` and query for the required value::
To access any pipeline arguments within the body of a ``@pipeline_def`` function, the function
:meth:`nvidia.dali.Pipeline.current()` can be used::

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment on lines 1282 to 1287
@pipeline_def(batch_size=42, num_threads=3)
def my_pipe(flip_vertical, flip_horizontal):
pipe = Pipeline.current()
x = pipe.batch_size
y = pipe.num_threads
...
Copy link
Contributor

@jantonguirao jantonguirao Mar 31, 2021

Choose a reason for hiding this comment

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

Suggested change
@pipeline_def(batch_size=42, num_threads=3)
def my_pipe(flip_vertical, flip_horizontal):
pipe = Pipeline.current()
x = pipe.batch_size
y = pipe.num_threads
...
@pipeline_def()
def my_pipe():
pipe = Pipeline.current()
batch_size = pipe.batch_size
num_threads = pipe.num_threads
...
pipe = my_pipe(batch_size=42, num_threads=3)
...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL
Copy link
Contributor Author

JanuszL commented Apr 1, 2021

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2226541]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2226541]: BUILD PASSED

@JanuszL JanuszL merged commit 2f20dd9 into NVIDIA:master Apr 1, 2021
@JanuszL JanuszL deleted the fix_duplicated_pipeline branch April 1, 2021 17:04
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