Make Python native module initialization more robust
We should eagerly import everything that we need, and decide exactly what error should be thrown if we encounter a Rust error inside the #[pymodule] initializer.
Hi, could you please explain in more detail what changes or improvements you're looking for regarding making the Python native module initialization more robust? Specifically, what do you mean by 'eagerly import everything' and what kind of errors should we handle in the #[pymodule] initializer?
Done in https://github.com/tensorzero/tensorzero/pull/2487
@Tekalig This issue was about making sure that we have our Python error classes loaded very early during our native module initialization, so that we know that we can throw them if anything goes wrong during initialization.