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

Pipeline decorator #2629

Merged
merged 20 commits into from
Feb 12, 2021
3 changes: 2 additions & 1 deletion dali/python/nvidia/dali/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,8 @@ def create_pipeline(*args, **kwargs):
pipe = Pipeline(**{**pipeline_kwargs, **ctor_args}) # Merge and overwrite dict
with pipe:
pipe_outputs = func(*args, **fn_kwargs)
pipe.set_outputs(*pipe_outputs)
_ = pipe_outputs if isinstance(pipe_outputs, tuple) else pipe_outputs,
pipe.set_outputs(*_)
Copy link
Contributor

Choose a reason for hiding this comment

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

PLZ NO.
_ is for ignored values.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

return pipe
return create_pipeline
return actual_decorator(fn) if fn else actual_decorator
Loading