Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-64994

Unable to use latest Python machine learning backend in stable versions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4.7, 3.5.4, 3.6.2, 3.7
    • Fix Version/s: 3.5.6, 3.6.4
    • Component/s: Analytics
    • Labels:
    • Testing Instructions:
      Hide

      Requirements

      Set-up

      1. Set the correct path to the Site administration > Server > System paths > Path to Python

      On a stable branch

      1. Install the moodlemlbackend 0.0.5 package: pip install -I moodlemlbackend==0.0.5
      2. Attempt to set Site administration > Analytics > Analytics settings > Default predictions processor to the Python machine learning backend
      3. TEST: The backend can be selected and no error is displayed
      4. Repeat the above steps, replacing the version with "0.37.0" and then "1.0.0". Stable versions are supposed to work with any of them.

      On master (3.7dev) branch

      1. Install the moodlemlbackend 0.0.5 package: pip install -I moodlemlbackend==0.0.5
      2. Attempt to set Site administration > Analytics > Analytics settings > Default predictions processor to the Python machine learning backend
      3. TEST: The backend can't be selected in the latest Moodle 3.7 and the error message suggests to update the package.
      4. Repeat the above steps, replacing the version with "0.37.0". Even that version is still not enough.
      5. Repeat the above steps, replacing the version with "1.0.0".
      6. TEST: The backend can be selected and no error is displayed
      Show
      Requirements Ability to install a particular version of the moodlemlbackend python package. You may wish to make use of https://docs.python.org/3/tutorial/venv.html Set-up Set the correct path to the Site administration > Server > System paths > Path to Python On a stable branch Install the moodlemlbackend 0.0.5 package: pip install -I moodlemlbackend==0.0.5 Attempt to set Site administration > Analytics > Analytics settings > Default predictions processor to the Python machine learning backend TEST : The backend can be selected and no error is displayed Repeat the above steps, replacing the version with "0.37.0" and then "1.0.0". Stable versions are supposed to work with any of them. On master (3.7dev) branch Install the moodlemlbackend 0.0.5 package: pip install -I moodlemlbackend==0.0.5 Attempt to set Site administration > Analytics > Analytics settings > Default predictions processor to the Python machine learning backend TEST : The backend can't be selected in the latest Moodle 3.7 and the error message suggests to update the package. Repeat the above steps, replacing the version with "0.37.0". Even that version is still not enough. Repeat the above steps, replacing the version with "1.0.0". TEST : The backend can be selected and no error is displayed
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
      MDL-64994-35-pythonmlversion
    • Pull 3.6 Branch:
      MDL-64994-36-pythonmlversion
    • Pull Master Branch:
      MDL-64994-master-pythonmlversion

      Description

      As a part of MDL-60944, the commit 18eb9a37334 changed the \mlbackend_python\processor::REQUIRED_PIP_PACKAGE_VERSION to 0.37.0 which is the latest version of the Python package https://github.com/moodlehq/moodle-mlbackend-python

      This latest version 0.37.0 is installed by default when using the documented procedure of installing the package.

      In stable branches such as Moodle 3.6, the constant was not changed and it still holds the original value 0.0.5.

      The bug is that the method \mlbackend_python\processor::is_ready() checks for exact match of the versions. So if I have the latest version 0.37.0 installed, my Moodle 3.6 installation does not allow me to select the Python machine learning backend as the default one with the invalid error:

      The selected predictions processor is not ready: "moodlemlbackend" python package should be updated. The required version is "0.0.5" and the installed version is "0.37.0"

      We need to make it so that REQUIRED_PIP_PACKAGE_VERSION or higher is present.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/May/19

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 45 minutes
                1h 45m