Either running locally from the web server or using a server if
TEST_MLBACKEND_* vars are set. The tests will still be skipped if
the python backend is not available in the web server.
- Basic unit test for minimum machine learning backends requirements
- Warning return messages now include not enough data
- Clear models when the predictions processor is changed
- Refined the name of a couple of constants / methods
This was supposed to be split into multiple commits to make it easier to understand
but I failed to do it properly. So this is the list of changes:
- New analytics_indicator_calc db table to store indicators calculations
- Reuse previous calculations during prediction/training; other models
previous calculations should also be reused as long as they belong to
the same sample (sampleid depends on sampleorigin), time range and indicator
- Allow bulk inserting of these calculations as this can hurt database performance
- Block the same analysable to be analysed for training and for prediction
- Use a new instance of the target and use it for is_valid_* functions
as using ::is_valid_sample can lead to problems if people
uses it to cache stuff
Now we only predict using the most recent range available, this means
that if someone upgrades to moodle 3.4 at three quarters of a course
we will only calculate the latest range, previous ranges were not
displayed anyway once more recent predictions were available.
This commit deletes all previous predictions :) this shouldn't be a
problem in master as we don't provide any guarantee, the alternative
(retrive sampleids from mdl_files) would have been slow and a waste of
time as well as require horrible code in an upgrade step (text fields
do not accept defaults nor we can use NOTNULL).