Once the Python Machine Learning Backend has been installed on the server, it is time to change the Moodle settings for better analytics.

Here are the steps.

Step 1.

  1. Log in to Moodle with Site administrator role.
  2. Navigate to “Site administration / Server / System paths”.
  3. Set Path to Python.
  4. Click on “Save changes” button.
Moodle Site administration / Server / System paths / Path to Python
Path to Python to set

Step 2.

Now we need to set the analytics on the main settings page. Unfortunately for every analytics model the settings need to be changed as well.

  1. Navigate to “Site administration / Analytics / Analytics settings”.
  2. Set Default predictions processor to Python machine learning backend.
  3. Navigate to “Site administration / Analytics / Analytics models”.
  4. Select “Edit” from the “Actions” dropdown menu for each model.
  5. Set Predictions processor to Python machine learning backend.
Moodle Analytics settings, Default predictions processor
Analytics settings to set
Analytics model, Prediction processor setting
Changing the Prediction processor to Python machine learning backend

That’s all folks.

In the next Part the Tensorboard evaluation will be introduced.

Cheers,

9 thoughts to “Moodle Analytics – Part 2. – Setting up the Python Machine Learning Backend in Moodle

  • Purwoko Haryadi Santoso

    I have followed the Previous Post (Install the moodlemlbackend on the server). However, I found issue in Step 1. It said “The selected predictions processor is not ready: The moodlemlbackend Python package is not installed or there is a problem with it. Please execute “/home/*********/virtualenv/analytics/3.7/bin/python -m moodlemlbackend.version” from command line interface for more info.”

    Any solution? Thank you.

    Reply
    • Gábor Zsolt Nagy

      As I can see, you installed Python 3.7. Please check if it is compatible with the latest moodlebackend.
      https://github.com/moodlehq/moodle-mlbackend-python/blob/master/requirements.txt
      What Moodle version are you using?

      Reply
      • Purwoko Haryadi Santoso

        My moodle is on Version 4.0.3 (Build: 20220822).

        Reply
        • Gábor Zsolt Nagy

          As mentioned in my article for me only Python 3.4 worked properly.
          Have you tried that Python version?

          Reply
          • Purwoko Haryadi Santoso

            Unfortunately, there is no option to choose Python 3.4 in my cpanel version from Indonesian shared hosting. Instead, it recommends minimum 3.6.15 up to 3.10.4.

            Can we communicate via email to consult in more detail? Thank you.

          • Gábor Zsolt Nagy

            I am going to check the Python versions and will let you by mail.
            Gábor

          • Gábor Zsolt Nagy

            Successfully installed moodlemlbackend 3.0.5 with Python 3.6. Check the new article:
            Moodle Analytics – Part 1. – Setting up the Python Machine Learning Backend in cPanel – Reloaded

  • Purwoko Haryadi Santoso

    Thanks for the recent updated post. Actually, my issue occurs in part 2 of your tutorial as described in the current page. I have successfully installed the moodlemlbackend.

    Maybe, you can read my post in the Moodle forum in https://moodle.org/mod/forum/discuss.php?d=426515

    Reply
    • Gábor Zsolt Nagy

      I sent an email to you 3 days ago. You can reply to that address.

      I have never faced this problem.
      What I suggest is to change the debugging setting to developer in Moodle Site administration / Development / Debugging, and check the log.

      Reply

Leave a comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.