-
Notifications
You must be signed in to change notification settings - Fork 3
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
[ENH] sktime
API compliance test to loop through tests individually
#94
[ENH] sktime
API compliance test to loop through tests individually
#94
Conversation
sktime
compliance test to loop through tests individuallysktime
API compliance test to loop through tests individually
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #94 +/- ##
==========================================
+ Coverage 94.64% 94.83% +0.18%
==========================================
Files 26 26
Lines 1177 1180 +3
==========================================
+ Hits 1114 1119 +5
+ Misses 63 61 -2 ☔ View full report in Codecov by Sentry. |
Ubuntu breaks without logging error message, but tells error code 143. Seems related to jax/numpyro? |
well, maybe my first guess is going to be proven accurate? (from earlier discord discussion)
|
maybe turning on verbose mode in the Feel free to take over this PR. |
You could also try locally to loop through |
Yes 🎯
Thanks, I will dive deeper into this problem and try to find the source |
could the failures perhaps be related to this, similar issue in Something about the load order of modules - in this specific case, if FYI @fnhirwa |
This is not the same problem here, it is a computational resource issue, I just checked locally and the tests start to hang when testing This can prevent the hang. |
@@ -1,7 +1,7 @@ | |||
"""Test the sktime contract for Prophet and HierarchicalProphet.""" | |||
|
|||
import pytest | |||
from sktime.utils.estimator_checks import check_estimator | |||
from sktime.utils.estimator_checks import check_estimator, parametrize_with_checks | |||
|
|||
from prophetverse.sktime import HierarchicalProphet, Prophetverse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you import all the other models, parametrize them as PROPHET_MODELS
and add a get_test_params
to each would cause the tests to run without the existing issue.
Thank you @fnhirwa! Just got back from vacation and will take a look at what you've suggested |
This is not my area of expertise, but I suspect the issue might be related to garbage collection and JAX. I noticed that test_predict_time_index has around 54 parameterizations, and I suspect that something may be hanging after each iteration. I found this discussion on JAX's GitHub repo jax-ml/jax#15972 where a simple code using device_get causes a memory problem, and NumPyro's SVI class uses device_get during inference. |
Possibly also related to jax-ml/jax#17432 |
Sounds strange, will look into this in details 🤞 |
Since the test runs the inference with non-static observations, seems to be related to pyro-ppl/numpyro#1347 Will also try the suggestions that were given in that issue. |
It seems that it is indeed related to memory leak when using Numpyro/JAX. After wrapping the SVI in a function as suggested in pyro-ppl/numpyro#1347, the tests have passed. Now the problem is how long it takes to run all those tests, which is strange since the models are relatively fast with the given test parameters. |
Well, so the tests were useful after all... The runtimes indeed look strange, these are in the order of tests for all estimators on sktime itself. |
@fkiraly, I really liked using this decorator. It made it easier to debug where the problem was coming from. On my MacBook, I detected two tests that are taking more time to finish: To avoid the 5-hour duration of the test, I'm not considering negative binomial and gamma in
|
3f6c300
into
felipeangelimvieira:main
This PR replaces the current logic in the
sktime
API compliance test, a bulk run ofcheck_estimator
, withparametrize_with_checks
decoration and a run per test.This allows to report individual failures of tests, and better diagnose memory leaks, such as those reported in #89.
Also removes the test skip.