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

Proposal: support for loops and control flow operators with cell magics #774

Open
jaanli opened this issue May 7, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@jaanli
Copy link

jaanli commented May 7, 2024

Problem

I am building educational materials for my data thinking lectures, such as:

https://colab.research.google.com/github/onefact/datathinking.org-codespace/blob/main/notebooks/princeton-university/week-1-visualizing-33-million-phone-calls-in-new-york-city.ipynb

https://colab.research.google.com/github/jaanli/language-model-notebooks/blob/main/notebooks/getting-started.ipynb

https://colab.research.google.com/github/onefact/electronic-health-records/blob/main/notebooks/loading_physionet_mimic_data.ipynb

In the last example, there is a lot of repetitive copy and pasting (about 40 copy and pastes needed to rerun the parent prompt on each of the files in the current working directory).

Proposed Solution

There should be a way to accept additional input such as --format or create cells automatically: https://stackoverflow.com/questions/13614783/programmatically-add-cells-to-an-ipython-notebook-for-report-generation (though this seems complicated).

Additional context

Guidance (https://github.com/guidance-ai/guidance) comes to mind and SGLang (https://github.com/sgl-project/sglang) and aici (https://github.com/microsoft/aici).

Open to any suggestions on ways to reduce the overhead! This library is already making complex analytics pipelines accessible to my students, so I'm very grateful 🙏

@jaanli jaanli added the enhancement New feature or request label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant