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

docs: Preserve output, clean eval notebooks #1590

Merged
merged 6 commits into from
Oct 13, 2023

Conversation

pbadhe
Copy link
Collaborator

@pbadhe pbadhe commented Oct 9, 2023

Resolves #1559

  • Output
  • Removed metadata and execution count

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@axiomofjoy
Copy link
Contributor

Hey @pbadhe, thanks for picking up this ticket. In addition to executing the notebooks to include input, we also need to alter the hatch notebook command for cleaning the notebook to exclude notebooks inside the evals directory.

clean = [

This command is causing the current pipeline failure:

- name: Check notebooks have cleaned output and metadata

@pbadhe pbadhe marked this pull request as ready for review October 12, 2023 05:48
@@ -197,7 +197,7 @@ fix = [

[tool.hatch.envs.notebooks.scripts]
clean = [
"jupyter nbconvert --ClearOutputPreprocessor.enabled=True --ClearMetadataPreprocessor.enabled=True --inplace **/*.ipynb **/**/*.ipynb",
"jupyter nbconvert --ClearOutputPreprocessor.enabled=True --ClearMetadataPreprocessor.enabled=True --inplace **/*.ipynb **/internal/*.ipynb **/tracing/*.ipynb **/dolly-pythia-fine-tuned/*.ipynb",
Copy link
Collaborator Author

@pbadhe pbadhe Oct 12, 2023

Choose a reason for hiding this comment

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

Had to do this as I couldn't find a negation(!) wildcard (for all *.ipynb except evals/*) that works in both windows and unix at the same time, apart from writing a new py script and then calling it in here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a shell command that works?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This one does find . -name "*.ipynb" -not -path "./tutorials/evals/*" -exec jupyter nbconvert --ClearOutputPreprocessor.enabled=True --ClearMetadataPreprocessor.enabled=True --inplace {} \;

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good.

@mikeldking
Copy link
Contributor

mikeldking commented Oct 13, 2023

We missed the pre-commit hook (which I think is sorta a problem that we have two checks). Will reopen the ticket

@mikeldking mikeldking merged commit c092387 into Arize-ai:main Oct 13, 2023
6 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

CI: Preserve the output of the eval notebooks
3 participants