-
Notifications
You must be signed in to change notification settings - Fork 621
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
Conversation
- 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>
!build |
CI MESSAGE: [2214847]: BUILD STARTED |
CI MESSAGE: [2214847]: BUILD PASSED |
dali/python/nvidia/dali/pipeline.py
Outdated
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:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
dali/python/nvidia/dali/pipeline.py
Outdated
@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 | ||
... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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) | |
... |
There was a problem hiding this comment.
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>
!build |
CI MESSAGE: [2226541]: BUILD STARTED |
CI MESSAGE: [2226541]: BUILD PASSED |
section
Signed-off-by: Janusz Lisiecki jlisiecki@nvidia.com
Why we need this PR?
Pick one, remove the rest
What happened in this PR?
Fill relevant points, put NA otherwise. Replace anything inside []
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
pipeline docs page
Wording in the example
CI
Pipeline doc page was updated
JIRA TASK: [NA]