Replies: 1 comment
-
@amyodov vbt pro has a global registry of numba compiled functions so you can programmatically change the decorator of any function at startup. This feature is not and won't be available in the free version, unless you want to make a PR. As a workaround, you can simply disable numba globally or extract the python function from each numba-compiled function ( |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
Is there any way to globally turn the numba precompilation of functions on or off, for all vectorbt scenarios? Like an environment variable, a global monkey-patch or something. That’s really an important feature, and if that’s available only in the pro-version of vectorbt... so be it.
It may seem counter-intuitive (why are you using vectorbt unless for the maximum performance?), but there are many cases when such feature is important or even mandatory. There may be parts of the complex system which do need the maximum performance (as they run in a loop); but some other parts may need the similar API, similar features, but cannot afford precompilation phase and longer startup: e.g. web server handlers that should generate the output instantaneously, serverless handlers at AWS Lambda. It would be great to avoid the JIT delay in the cases when we know, we can live without the JIT.
I tried some hacks/monkey-patches myself, such as monkeypatching
@jit
/@njit
decorators; but clearly, some more upstream support from this feature is needed, as vectorbt sometime tends to check if some function is actually numba-precompiled or not.Beta Was this translation helpful? Give feedback.
All reactions