I have a data science project that uses django as an experiment tracking and data management (annotation) backend. It exposes an API but also has a wrapper on top of the ORM that makes it possible to import the project in a Jupyter Notebook and use the ORM in an interactive fashion to create datasets from querysets, annotate new samples in a notebook and track/save training run artifacts.
I’m really excited for all of the new aio features that are coming so I tried to upgrade the project to 3.0 but unfortunately it breaks the jupyter based workflow that has worked so well for me. It turns out that ipykernel runs everything in an async context, causing django to throw a
SynchronousOnlyOperation error on any database call.
Is there a flag that I can set to disable this check when using the ORM outside of the typical web server request flow?