-
Notifications
You must be signed in to change notification settings - Fork 2
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
Task/weak numba dependency #26
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #26 +/- ##
==========================================
- Coverage 97.06% 96.98% -0.08%
==========================================
Files 44 33 -11
Lines 1873 1395 -478
==========================================
- Hits 1818 1353 -465
+ Misses 55 42 -13 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
…ur, compiles all functions, but does not evaluate them.
Another thing: I see the patch coverage is pretty low. Do you have time to write a few tests for the new njit module @johannvk? They can be placed in skchange/utils/numba/tests |
It took some trial and error, but I added tests for all the new configuration fuctionality now, and also added another test step to the Github Actions workflow to run all our tests with and without Numba jit-compilation. |
…tral/skchange into task/weak-numba-dependency
This PR adds numba as a weak / optional dependency of
skchange
, instead of the hard dependency it is now.To achieve this, we use the
sktime
function_check_soft_dependencies
, and return a passthrough version of the@jit
and@njit
decorators ifnumba
is not installed.Additionally, this PR enables the configuring of some
numba
default@njit
parameters through the setting of environment variables.Currently the supported parameters are
cache
,parallel
, andfastmath
, set by the corresponding environment variablesNUMBA_CACHE
,NUMBA_PARALLEL
, andNUMBA_FASTMATH
.The current implementation only sets the defaults, so if a user of the
numba
decorator specifies e.g.fastmath=False
, their choice will not be overridden.