Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: import datasets #7

Merged
merged 8 commits into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/run-all-steps-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Run all steps (nightly)

on:
schedule:
- cron: 59 23 * * *

jobs:
run_all_steps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Run All Steps (1-3)
run: |
python run_all_steps.py

- name: Git Config
run: |
git config user.name 'Nya Ξlimu'
git config user.email '[email protected]'
- name: Git Commit
run: |
git add step1_prepare/*.csv
git commit -m 'chore(ml): run all steps' --allow-empty
- name: Git Push
run: |
git push
38 changes: 38 additions & 0 deletions .github/workflows/run-all-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run all steps

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
run_all_steps:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Run All Steps (1-3)
run: |
python run_all_steps.py
24 changes: 11 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
# ml-storybooks-recommender 🤖📚
# ML: Storybook Recommender 🤖📚

Machine learning model which predicts the rating of unread storybooks based on the student's previously read storybooks.
> Machine learning model which predicts the likability of unread storybooks based on a child's previously read
> storybooks.

One model will be trained per language.
> [!IMPORTANT]
> This learning model will be used by Android applications, so it needs to be stored in a format standard compatible
> with the Android technology, e.g. [ONNX](https://onnx.ai).


## 1. Prepare the Data

To prepare the data, follow these steps:
* Open `prepare_data.py` and select environment and language.
* Go to the website corresponding to the chosen environment and language, e.g. https://eng.test.elimu.ai.
* Download `storybooks.csv` from https://eng.test.elimu.ai/content/storybook/list.
* Download `storybook-learning-events.csv` from https://eng.test.elimu.ai/analytics/storybook-learning-event/list.
* Add the two datasets to `RAW_DATA_DIR`.
* Execute the script: `python prepare_data.py`
See [`step1_prepare`](./step1_prepare)


## 2. Train the Model

TODO
See [`step2_train`](./step2_train)


## 3. Make Predictions on New Samples

TODO
See [`step3_predict`](./step3_predict)


---

<p align="center">
<img src="https://github.com/elimu-ai/webapp/blob/main/src/main/webapp/static/img/logo-text-256x78.png" />
</p>
jo-elimu marked this conversation as resolved.
Show resolved Hide resolved
<p align="center">
elimu.ai - Free open-source learning software for out-of-school children ✨🚀
elimu.ai - Free open-source learning software for out-of-school children 🚀✨
</p>
<p align="center">
<a href="https://elimu.ai">Website 🌐</a>
Expand Down
26 changes: 0 additions & 26 deletions env-TEST/lang-ENG/data/storybook-learning-events.csv

This file was deleted.

Loading
Loading