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

Unable to use Python machine learning backend (moodlemlbackend) v1.0.1 in Moodle v3.7.2

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a bug
    • Affects Version/s: 3.7.2
    • Fix Version/s: None
    • Component/s: Analytics
    • Labels:
      None
    • Affected Branches:
      MOODLE_37_STABLE

      Description

      I have

      • Debian 10 Buster,
      • Moodle v3.7.2,
      • Python v2.7,
      • moodlemlbackend v1.0.1 & requirements
        installed.

      Earlier I had one problem with tensorflow v1.14.0, which crashed with my CPU:

       > Nov 4 17:12:32 moodle37 kernel: [9773297.574293] traps: python2.7[4570] trap invalid opcode ip:7fb9b74bca59 sp:7ffdb7605e10 error:0 in libtensorflow_framework.so.1[7fb9b6d97000+18f8000]

       I also got:

      python -c 'import tensorflow'
      Illegal instruction

       

      So I had to build from source with following build options:

      -march=nehalem -msse4.1 -msse4.2 -mpclmul -mpopcnt -maes -mno-avx -mno-avx2

      Now

      python -c 'import tensorflow'

      results nothing, so it is imported successfully.

       
      After fixing tensorflow v1.14.0, still no result in Moodle v3.7.2 when I go to
      _Dashboard/Site administration/Analytics/Analytics models/Students at risk of dropping out/Get predictions:_
      Result: There is no new data that can be used for training
      _Dashboard/Site administration/Analytics/Analytics models/Students at risk of dropping out/Evaluate model:_
      Result: No results returned from the predictions processor. Check the output directory contents for more information.

      moodlemlbackend requirements satisfied:

      pip install "moodlemlbackend>=1.0.0,<2.0.0"
      DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
      Requirement already satisfied: moodlemlbackend<2.0.0,>=1.0.0 in /usr/local/lib/python2.7/dist-packages (1.0.1)
      Requirement already satisfied: scikit-learn<0.21,>=0.20 in /usr/local/lib/python2.7/dist-packages (from moodlemlbackend<2.0.0,>=1.0.0) (0.20.4)
      Requirement already satisfied: tensorflow<1.15,>=1.14.0 in /usr/local/lib/python2.7/dist-packages (from moodlemlbackend<2.0.0,>=1.0.0) (1.14.0)
      Requirement already satisfied: numpy<1.17,>=1.16.0 in /usr/local/lib/python2.7/dist-packages (from moodlemlbackend<2.0.0,>=1.0.0) (1.16.5)
      Requirement already satisfied: matplotlib<1.6,>=1.5.0 in /usr/local/lib/python2.7/dist-packages (from moodlemlbackend<2.0.0,>=1.0.0) (1.5.3)
      Requirement already satisfied: scipy>=0.13.3 in /usr/local/lib/python2.7/dist-packages (from scikit-learn<0.21,>=0.20->moodlemlbackend<2.0.0,>=1.0.0) (0.17.1)
      Requirement already satisfied: keras-applications>=1.0.6 in ./.local/lib/python2.7/site-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (1.0.6)
      Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (1.12.0)
      Requirement already satisfied: tensorboard<1.15.0,>=1.14.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (1.14.0)
      Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (1.24.3)
      Requirement already satisfied: gast>=0.2.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (0.3.2)
      Requirement already satisfied: google-pasta>=0.1.6 in /usr/local/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (0.1.7)
      Requirement already satisfied: protobuf>=3.6.1 in /usr/local/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (3.9.1)
      Requirement already satisfied: tensorflow-estimator<1.15.0rc0,>=1.14.0rc0 in /usr/local/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (1.14.0)
      Requirement already satisfied: backports.weakref>=1.0rc1 in /usr/local/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (1.0.post1)
      Requirement already satisfied: enum34>=1.1.6 in /usr/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (1.1.6)
      Requirement already satisfied: mock>=2.0.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (3.0.5)
      Requirement already satisfied: astor>=0.6.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (0.8.0)
      Requirement already satisfied: absl-py>=0.7.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (0.8.1)
      Requirement already satisfied: wheel in /usr/local/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (0.33.6)
      Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (1.1.0)
      Requirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (1.1.0)
      Requirement already satisfied: wrapt>=1.11.1 in /usr/local/lib/python2.7/dist-packages (from tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (1.11.2)
      Requirement already satisfied: pyparsing!=2.0.0,!=2.0.4,!=2.1.2,>=1.5.6 in /usr/local/lib/python2.7/dist-packages (from matplotlib<1.6,>=1.5.0->moodlemlbackend<2.0.0,>=1.0.0) (2.4.2)
      Requirement already satisfied: python-dateutil in /usr/local/lib/python2.7/dist-packages (from matplotlib<1.6,>=1.5.0->moodlemlbackend<2.0.0,>=1.0.0) (2.8.0)
      Requirement already satisfied: cycler in /usr/local/lib/python2.7/dist-packages (from matplotlib<1.6,>=1.5.0->moodlemlbackend<2.0.0,>=1.0.0) (0.10.0)
      Requirement already satisfied: pytz in /usr/local/lib/python2.7/dist-packages (from matplotlib<1.6,>=1.5.0->moodlemlbackend<2.0.0,>=1.0.0) (2019.2)
      Requirement already satisfied: h5py in /usr/local/lib/python2.7/dist-packages (from keras-applications>=1.0.6->tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (2.10.0)
      Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python2.7/dist-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (41.2.0)
      Requirement already satisfied: futures>=3.1.1; python_version < "3" in /usr/local/lib/python2.7/dist-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (3.3.0)
      Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python2.7/dist-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (3.1.1)
      Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python2.7/dist-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (0.16.0)
      Requirement already satisfied: funcsigs>=1; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from mock>=2.0.0->tensorflow<1.15,>=1.14.0->moodlemlbackend<2.0.0,>=1.0.0) (1.0.2)

       

      Any idea how can I make it work?
      How could I debug the problem?

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            klor Konrad Lorinczi
            Participants:
            Component watchers:
            Elizabeth Dalton, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: