-
Notifications
You must be signed in to change notification settings - Fork 232
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
Erroneous warning #980
Comments
thanks for opening this! here's the background. the warning is this:
we use nbconvert to convert ipynb files to html/pdf. nbconvert offers options such as excluding the source code in the output file (exclude_input=True); however, this setting is not applicable if the user selected ipynb as the output format (because we won't have to use nbconvert for that); that's why we show the warning: it's telling the user that the setting is on, but it wont have any effect. however, we recently allowed users to select multiple formats from a notebook task. for example, a notebook task might generate an output ipynb, html and pdf. Under this scenario, the warning should not be displayed. Hence, the old condition for the warning was: is the output an ipynb file? but now it should become: is the only output an ipynb file? |
I'm a bit confused why we don't want the warning in this situation Here is the relevant part of the pipeline from the original issue - source: tasks/linear-regression.py
product:
nb: output/linear-regression.ipynb
papermill_params:
allow_nested_loop: True
nbconvert_export_kwargs:
# optionally hide the code from the report
exclude_input: True Correct me if I'm wrong, but it seems like this task only generates one output, |
the other way around:
the logic is: if a user puts |
In the snippet, isn't the only output a single notebook, so we want to show the warning? In the original issue I thought it was showing the warning when we don't want to show it |
if you mean this snippet: - source: tasks/linear-regression.py
product:
nb: output/linear-regression.ipynb
papermill_params:
allow_nested_loop: True
nbconvert_export_kwargs:
# optionally hide the code from the report
exclude_input: True yes, here we show the warning |
exclude input doesn't do anything here: ploomber/ploomber#980 (comment)
@edublancas please review |
* test multiple outputs in convert with kwargs not warning * fixes #980 Co-authored-by: Eduardo Blancas Reyes <[email protected]>
When running this code I get this output and warning:
here is the rest of the source:
https://github.com/ploomber/projects/tree/master/guides/intro-to-ploomber
I'm not sure what the cause is, but I believe there should not be a warning here.
The text was updated successfully, but these errors were encountered: