mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-59152 mlbackend_php: Check PHP version
Part of MDL-57791 epic.
This commit is contained in:
parent
ad7a4d3521
commit
db3252c18d
@ -55,6 +55,9 @@ class processor implements \core_analytics\predictor {
|
||||
protected $limitedsize = false;
|
||||
|
||||
public function is_ready() {
|
||||
if (version_compare(phpversion(), '7.0.0') < 0) {
|
||||
return get_string('errorphp7required', 'mlbackend_php');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
|
||||
$string['pluginname'] = 'PHP predictor';
|
||||
$string['errorcantloadmodel'] = 'Model file {$a} does not exist, ensure the model has been trained before using it to predict.';
|
||||
$string['errornotenoughdata'] = 'The evaluation results varied too much, you could try to gather more data to ensure the model is valid. Evaluation results standard deviation = {$a->deviation}, maximum recommended standard deviation = {$a->accepteddeviation}';
|
||||
$string['errorlowscore'] = 'The evaluated model prediction accuracy is not very high, some predictions may not be accurate. Model score = {$a->score}, minimum score = {$a->minscore}';
|
||||
$string['datasetsizelimited'] = 'Only a part of the evaluation dataset has been evaluated due to its size. Set $CFG->mlbackend_php_no_memory_limit if you are confident that your system can cope a {$a} dataset';
|
||||
$string['errorcantloadmodel'] = 'Model file {$a} does not exist, ensure the model has been trained before using it to predict.';
|
||||
$string['errorlowscore'] = 'The evaluated model prediction accuracy is not very high, some predictions may not be accurate. Model score = {$a->score}, minimum score = {$a->minscore}';
|
||||
$string['errornotenoughdata'] = 'The evaluation results varied too much, you could try to gather more data to ensure the model is valid. Evaluation results standard deviation = {$a->deviation}, maximum recommended standard deviation = {$a->accepteddeviation}';
|
||||
$string['errorphp7required'] = 'The PHP machine learning backend requires PHP 7';
|
||||
$string['pluginname'] = 'PHP machine learning backend';
|
||||
|
Loading…
x
Reference in New Issue
Block a user