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

Unable to use latest Python machine learning backend in stable versions

XMLWordPrintable

    • MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MDL-64994-master-pythonmlversion
    • 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

      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.

            mudrd8mz David Mudrák (@mudrd8mz)
            mudrd8mz David Mudrák (@mudrd8mz)
            David Monllaó David Monllaó
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Michael Hawkins Michael Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.