Giter VIP home page Giter VIP logo

taxinomitis's Introduction

Machine Learning for Kids

What is this?

This is the source code for the API and website behind Machine Learning for Kids.

It's a tool aimed at children, which introduces machine learning by providing them with hands-on experiences for training simple machine learning systems and building things with them.

It provides an easy-to-use guided environment for training machine learning models for classifying text, numbers or recognising images.

This builds on existing efforts to introduce and teach coding to children, by adding these models to Scratch (a widely used educational coding platform), allowing children to create projects and build games with the machine learning models that they've trained.

It's currently running at https://MachineLearningForKids.co.uk

The code

Build Status

This started as a personal side-project by Dale Lane for use by a couple of local schools. It's grown far beyond what I expected.

All of this is a long-winded way of saying that I never expected to share this code with anyone, let alone open-source it. It definitely has many of the embarrassing hallmarks of a hobby project tinkered with in evenings and weekends... please keep that in mind when you look through the code, and bear with me while I try and tidy things up.

The project worksheets

They are in a separate repository, so that they can be updated more frequently without re-deploying the application. They're all MS Word documents, so if you'd like to make improvements or even provide a new project worksheet, that would be fantastic.

They are managed in a separate repository. If you'd like to report a problem with one of the project worksheets, submit changes, or suggest or contribute a new project worksheet, please do that in the taxinomitis-docs repository.

taxinomitis's People

Contributors

abertagnon avatar alexandermirzoyan avatar chrisdorna avatar dalelane avatar dancursinfo avatar danielaschell avatar dependabot[bot] avatar dgraveling avatar dolph avatar dprabhath avatar fbocquet avatar gabrielcbe avatar imgbot[bot] avatar jaapin avatar joshualowe1002 avatar kant avatar lotte321 avatar marianogoldman avatar michal-miky-jankovsky avatar oana-sipos avatar psychemedia avatar tonyya4ai avatar transifex-integration[bot] avatar watsonvaclase avatar yhlee1627 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

taxinomitis's Issues

Unicode characters in project names

A few errors in production.... looks like someone was trying to create a project with a name made up of Unicode characters

2018-07-16T09:47:30.69+0100 [APP/PROC/WEB/2] ERR {"name":"ml-for-kids","hostname":"032dfbf0-71c7-4343-46d6-8b3a","pid":51,"level":50,"err":{"message":"Incorrect string value: '\\xEF\\xBC\\x9F' for column 'name' at row 1","name":"Error","stack":"Error: Incorrect string value: '\\xEF\\xBC\\x9F' for column 'name' at row 1\n at PromisePoolConnection.PromiseConnection.execute (/home/vcap/app/node_modules/mysql2/promise.js:102:20)\n at Object.storeProject (/home/vcap/app/dist/lib/db/store.js:100:47)\n at <anonymous>\n at process._tickDomainCallback (internal/process/next_tick.js:228:7)","code":"ER_TRUNCATED_WRONG_VALUE_FOR_FIELD"},"msg":"DB error","time":"2018-07-16T08:47:30.698Z","v":0}

Feature request: Allow try it now users to share their projects

Problem: If a group of students all use the Try It Now authentication mechanism for creating their projects, they can't then log into another computer to demonstrate their work. This is because the authentication is tied to the browser session.

Possible solution: allow a mechanism to "share" their work by generating a token that is easy to read (such as green-gazelle) so they can then switch to another computer to demo/continue their work.

UI tests

The back-end and REST APIs have reasonable test coverage, but there are no tests for the UI.

It would be good to identify the most critical areas to start introducing tests for.

Document the Auth0 setup

Auth0 is used to provide the back-end for auth and user management, but the setup is a little involved. I should write down exactly how to do it.

Enable Python projects

A common request for secondary school students is to be able to migrate from projects in Scratch to writing their own projects in Python.

This can be enabled by providing a simple Python SDK that can call the endpoints used by Scratch (so as not to require any new server-side endpoints/APIs).

The UI can display a customized snippet for how to use the SDK for a particular project, as well as helper code to explain how to send images.

Document the process of running the site locally

I should write down the steps needed to run the whole site locally.

This includes:

  • Starting and configuring a local MySQL DB
  • Creating Object Storage instance
  • Creating a developer instance of Auth0
  • Running a local taxinomitis-numbers instance
  • Compiling the TypeScript for the back-end
  • Building the Angular front-end
  • Setting up the environment variables
  • Downloading a copy of ScratchX

A small opinion

Hello, when you are training, the title of the small topic will not be changed, only the option will be changed. This is very bad.

Update doc and template links to new github repo

https://github.com/dalelane/ml-for-kids has been moved to https://github.com/IBM/taxinomitis-docs

The references throughout the site need to be updated to match

e.g.
links to project worksheets -

vm.worksheets = [
{
title : 'Smart classroom',
summary : 'Teach a computer to recognise the meaning of your commands',
description : 'Create a smart assistant in Scratch that lets you control virtual devices.',
difficulty : 'Beginner',
type : 'text',
image : 'static/images/project-smartclassroom.png',
tags : [ 'digital assistants', 'supervised learning' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-smartclassroom.pdf',
downloads : [
{
description : 'Full version of the project, where the students make a non-machine learning version first to experience the value of using machine learning to do this',
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-smartclassroom.pdf'
},
{
description : 'Shorter version of the project, where the students only make a machine learning version of the assistant',
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-smartclassroom-easy.pdf'
}
]
},
{
title : 'Make me happy',
summary : 'Teach a computer to recognise compliments and insults',
description : 'Create a character in Scratch that smiles if you say nice things to it and cries if you say mean things to it.',
difficulty : 'Beginner',
type : 'text',
image : 'static/images/project-makemehappy.png',
tags : [ 'sentiment analysis', 'supervised learning' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-makemehappy.pdf',
downloads : [
{
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-makemehappy.pdf'
}
]
},
{
title : 'Snap!',
summary : 'Teach a computer to recognise what icons look like',
description : 'Make a card game in Scratch that learns to recognise pictures of your card.',
difficulty : 'Beginner',
type : 'images',
image : 'static/images/project-snap.png',
tags : [ 'image classification', 'supervised learning' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-snap.pdf',
downloads : [
{
description : 'Full version of the project, where the students make their own cards that they will train the computer to recognise',
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-snap.pdf'
},
{
description : 'Shorter version of the project, providing children with pre-made cards that you will need to print out, to save the students time having to make them',
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-snap-easy.pdf',
resources : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/resources-snap-easy.pdf'
}
]
},
{
title : 'Mailman Max',
summary : 'Teach a computer to recognise handwriting',
description : 'Make a postal sorting office in Scratch that can recognise handwritten postcodes on envelopes.',
difficulty : 'Beginner',
type : 'images',
image : 'static/images/project-mailmanmax.png',
tags : [ 'optical character recognition', 'handwriting recognition', 'image classification', 'supervised learning' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-mailmanmax.pdf',
downloads : [
{
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-mailmanmax.pdf'
}
]
},
{
title : 'Car or cup',
summary : 'Teach a computer to recognise pictures of objects',
description : 'Train the computer to be able to sort photos into groups.',
difficulty : 'Beginner',
type : 'images',
image : 'static/images/project-carorcup.png',
tags : [ 'image classification', 'supervised learning', 'crowd sourcing' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-carorcup.pdf',
downloads : [
{
description : 'Individual version of the project, where each student trains their own machine learning model independently',
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-carorcup.pdf'
},
{
description : 'Group version of the project, where all students in the class work together to train a shared machine learning model',
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-carorcup-crowd.pdf'
}
]
},
{
title : 'Face Lock',
summary : 'Teach a computer to recognise faces',
description : 'Make a phone in Scratch that unlocks if it recognises your face.',
difficulty : 'Beginner',
type : 'images',
image : 'static/images/project-facelock.png',
tags : [ 'facial recognition', 'biometrics', 'image classification', 'supervised learning' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-facelock.pdf',
downloads : [
{
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-facelock.pdf'
}
]
},
{
title : 'Journey to school',
summary : 'Teach a computer to make predictions',
description : 'Train the computer to be able to predict how you travel to school in the morning.',
difficulty : 'Beginner',
type : 'numbers',
image : 'static/images/project-journeytoschool.png',
tags : [ 'predictive model', 'testing and accuracy', 'supervised learning' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-journeytoschool.pdf',
downloads : [
{
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-journeytoschool.pdf'
}
]
},
{
title : 'Pac-Man',
summary : 'Teach a computer to play a game',
description : 'Create a Pac-Man game in Scratch that learns how to avoid the ghost.',
difficulty : 'Intermediate',
type : 'numbers',
image : 'static/images/project-pacman.png',
tags : [ 'decision tree learning' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-pacman.pdf',
downloads : [
{
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-pacman.pdf'
}
]
},
{
title : 'Chatbots',
summary : 'Teach a computer to recognise questions',
description : 'Create a chatbot that can answer questions about a topic of your choice.',
difficulty : 'Intermediate',
type : 'text',
image : 'static/images/project-chatbots.png',
tags : [ 'sentiment analysis', 'supervised learning' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-chatbots.pdf',
downloads : [
{
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-chatbots.pdf'
}
]
},
{
title : 'Tourist Info',
summary : 'Teach a computer to make recommendations',
description : 'Create a mobile app in Scratch that recommends tourist attractions based on people\'s interests.',
difficulty : 'Intermediate',
type : 'text',
image : 'static/images/project-touristinfo.png',
tags : [ 'training bias', 'recommendations', 'supervised learning' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-touristinfo.pdf',
downloads : [
{
description : 'Full version of the project',
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-touristinfo.pdf'
},
{
description : 'Shorter version of the project, where students make less of the Scratch project themselves, with more of the scripting provided in the starter project file',
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-touristinfo-easy.pdf'
}
]
},
{
title : 'Sorting Hat',
summary : 'Teach a computer to recognise use of language',
description : 'Create a Sorting Hat like in Harry Potter, that puts you in a school House based on what you say.',
difficulty : 'Intermediate',
type : 'text',
image : 'static/images/project-sortinghat.png',
tags : [ 'text classification', 'supervised learning', 'crowd sourcing' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-sortinghat.pdf',
downloads : [
{
description : 'Individual version of the project, where each student trains their own machine learning model independently',
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-sortinghat.pdf'
},
{
description : 'Group version of the project, where all students in the class work together to train a shared machine learning model',
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-sortinghat-crowd.pdf'
}
]
},
{
title : 'Rock, Paper, Scissors',
summary : 'Teach a computer to recognise shapes',
description : 'Make a Rock, Paper, Scissors game in Scratch that learns to recognise hand shapes.',
difficulty : 'Intermediate',
type : 'images',
image : 'static/images/project-rockpaperscissors.png',
tags : [ 'image classification', 'supervised learning' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-rockpaperscissors.pdf',
downloads : [
{
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-rockpaperscissors.pdf'
}
]
},
{
title : 'Judge a book',
summary : 'Teach a computer to recognise visual style',
description : 'Make a game in Scratch to test whether it really is possible to judge a book by its cover.',
difficulty : 'Intermediate',
type : 'images',
image : 'static/images/project-judgeabook.png',
tags : [ 'image classification', 'supervised learning' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-judgeabook.pdf',
downloads : [
{
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-judgeabook.pdf'
}
]
},
{
title : 'Locate Larry',
summary : 'Teach a computer to find something in a picture',
description : 'Make a "Where\'s Wally?"-style game in Scratch, and teach the computer to find your character.',
difficulty : 'Intermediate',
type : 'images',
image : 'static/images/project-locatelarry.png',
tags : [ 'image classification', 'supervised learning', 'image pre-processing' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-locatelarry.pdf',
downloads : [
{
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-locatelarry.pdf'
}
]
},
{
title : 'Confused',
summary : 'Teach a computer to recognise fruit',
description : 'Learn about how computers can be confused and can make mistakes if they\'re trained badly.',
difficulty : 'Intermediate',
type : 'images',
image : 'static/images/project-confused.png',
tags : [ 'image classification', 'supervised learning', 'overfitting' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-confused.pdf',
downloads : [
{
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-confused.pdf'
}
]
},
{
title : 'School Library',
summary : 'Teach a computer to make recommendations',
description : 'Create a school librarian in Scratch that suggests who a reading book might be suitable for.',
difficulty : 'Intermediate',
type : 'numbers',
image : 'static/images/project-schoollibrary.png',
tags : [ 'predictive model', 'recommendations', 'supervised learning' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-schoollibrary.pdf',
downloads : [
{
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-schoollibrary.pdf'
}
]
},
{
title : 'Noughts & Crosses',
summary : 'Teach a computer to play a game',
description : 'Create a noughts and crosses game in Scratch that learns how to beat you.',
difficulty : 'Advanced',
type : 'numbers',
image : 'static/images/project-noughtsandcrosses.png',
tags : [ 'decision tree learning', 'reinforcement learning', 'categorical data' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-noughtsandcrosses.pdf',
downloads : [
{
description : 'Classroom version, where each student makes the game themselves',
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-noughtsandcrosses.pdf'
},
{
description : 'Demo version, for events like Science Fairs where each child has a minute or two to try something',
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-noughtsandcrosses-event.pdf'
}
]
},
{
title : 'Top Trumps',
summary : 'Teach a computer to play a game',
description : 'Train a computer to be able to play the Top Trumps card game in Scratch.',
difficulty : 'Advanced',
type : 'numbers',
image : 'static/images/project-toptrumps.png',
tags : [ 'decision tree learning', 'reinforcement learning', 'categorical data' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-toptrumps.pdf',
downloads : [
{
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-toptrumps.pdf'
}
]
},
{
title : 'Headlines',
summary : 'Test the computer\'s ability to recognise use of language',
description : 'Train a computer to recognise headlines from national newspapers.',
difficulty : 'Advanced',
type : 'text',
image : 'static/images/project-headlines.png',
tags : [ 'text classification', 'supervised learning', 'testing' ],
teachersnotes : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/teachersnotes-headlines.pdf',
downloads : [
{
description : 'Simplified version of the project, where students make a simple project to put newspapers on the right shelves',
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-headlines-easy.pdf'
},
{
description : 'Advanced version of the project, where students make a testing framework to analyse the performance of their model',
worksheet : 'https://github.com/dalelane/ml-for-kids/raw/master/worksheets/worksheet-headlines.pdf'
}
]

links to Help docs -

<a href="https://github.com/dalelane/ml-for-kids/raw/master/doc/machinelearningforkids-schools.pdf">
<img src="static/images/gettingstarted.png" border=0 alt="thumbnail image" align="left" hspace=10>
</a>
<a href="https://github.com/dalelane/ml-for-kids/raw/master/doc/machinelearningforkids-schools.pdf">
<h4>Managed class accounts</h4>
</a>
<div>For school teachers, coding group leaders, or other volunteers</div>
</div>
<div class="helpguide">
<a href="https://github.com/dalelane/ml-for-kids/raw/master/doc/machinelearningforkids-ibmer.pdf">
<img src="static/images/gettingstarted.png" border=0 alt="thumbnail image" align="left" hspace=10>
</a>
<a href="https://github.com/dalelane/ml-for-kids/raw/master/doc/machinelearningforkids-ibmer.pdf">
<h4>Unmanaged class accounts</h4>
</a>
<div>For IBM employees, or teachers and coding group leaders who manage their own class accounts</div>
</div>
</div>
</div>
<div class="faqs">
<h3>Having problems?</h3>
<div class="intro">
Is something not working?
</div>
<div class="intro">
The list below contains the questions and issues that I hear about most often. If you see something that looks similar to your problem, click
on the summary for more info.
</div>
<div class="intro">
If you're still stuck, or you've run into a problem I've not included in the list, sorry! Please <a href="mailto:[email protected]">let me know</a> so I can help.
</div>
<h4>Scratch issues</h4>
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#helpScratch" target="_self">I don't know how to get Scratch working</a>
</h4>
</div>
<div id="helpScratch" class="panel-collapse collapse">
<div class="panel-body">
<p>
Machine Learning for Kids uses Scratch 2. Scratch needs Adobe Flash to work, so you need to be using an operating system
and a web browser that can work with Flash (so that means no iPads for now, sorry).
</p>
<p>
If you're not sure about how to enable Flash, you can
<a href="https://github.com/dalelane/ml-for-kids/raw/master/doc/machinelearningforkids-scratchx.pdf">download a document with some tips for getting Scratch working</a>.
</p>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#helpSafeMode" target="_self">The "Load Project" and "Save Project" menus in Scratch don't work</a>
</h4>
</div>
<div id="helpSafeMode" class="panel-collapse collapse">
<div class="panel-body">
<p>
If you're using Safari on macOS and the Scratch menus "File -&gt; Load Project" and "File -&gt; Save Project" menus
aren't working, it might be that you're running in Safe Mode.
</p>
<p>
<a href="https://github.com/dalelane/ml-for-kids/raw/master/doc/safari-scratch-safemode.pdf">Follow the instructions here</a>

The structure of the taxinomitis-docs repo is different (as it is the result of merging three previous repos) so the URLs will need to be updated to match.

Automated compile and lint

As the number of developers increases, it’s going to be important to make it easier for developers to make code contributions to the project.

The code compile and linting that is currently being run manually using gulp should be extracted and made into a status check that can be run from Travis as part of pull request reviews.

Handle SIGTERM gracefully

A little bit of technical debt that it would be good to improve.

There are a bunch of long-running background tasks now. It would be good to have something that will handle SIGTERM by closing all of them cleanly.

Out of office notice

Everything in the site that is done manually (like setting up new Managed Classes) isn't going to happen while I'm on vacation.

It's probably worth adding a note on the site so people don't get annoyed waiting for a fortnight.

Failure to train image models should be better explained

Repeated attempts to train a machine learning model all failed with a generic "training failed" error message.

The server logs show that the training data was rejected by the Visual Recognition API because the request payload was too large.

"err":{"message":"413 - \"<html>\\r\\n<head><title>413 Request Entity Too Large</title></head>\\r\\n<body bgcolor=\\\"white\\\">\\r\\n<center><h1>413 Request Entity Too Large</h1></center>\\r\\n<hr><center>nginx</center>\\r\\n</body>\\r\\n</html>\\r\\n\"","name":"StatusCodeError","stack":"StatusCodeError: 413 - \"<html>\\r\\n<head><title>413 Request Entity Too Large</title></head>\\r\\n<body bgcolor=\\\"white\\\">\\r\\n<center><h1>413 Request Entity Too Large</h1></center>\\r\\n<hr><center>nginx</center>\\r\\n</body>\\r\\n</html>\\r\\n\"\n at new StatusCodeError (/home/vcap/app/node_modules/request-promise-core/lib/errors.js:32:15)\n at Request.plumbing.callback (/home/vcap/app/node_modules/request-promise-core/lib/plumbing.js:104:33)\n at Request.RP$callback [as _callback] (/home/vcap/app/node_modules/request-promise-core/lib/plumbing.js:46:31)\n at Request.self.callback (/home/vcap/app/node_modules/request/request.js:185:22)\n at emitTwo (events.js:126:13)\n at Request.emit (events.js:214:7)\n at Request.<anonymous> (/home/vcap/app/node_modules/request/request.js:1157:10)\n at emitOne (events.js:116:13)\n at Request.emit (events.js:211:7)\n at Gunzip.<anonymous> (/home/vcap/app/node_modules/request/request.js:1079:12)\n at Object.onceWrapper (events.js:313:30)\n at emitNone (events.js:111:20)\n at Gunzip.emit (events.js:208:7)\n at endReadableNT (_stream_readable.js:1055:12)\n at _combinedTickCallback (internal/process/next_tick.js:138:11)\n at process._tickDomainCallback (internal/process/next_tick.js:218:9)"}

Annoyingly the response came back as a stack trace in an HTML page, so it's not going to be the nicest thing to parse. But the 413 Request Entity Too Large is an obvious enough eye-catcher to be able to search for.

As the student(s) didn't know if it was a temporary glitch/error, they just kept hitting the training button. A lot. Repeatedly. (Which actually ended up crashing the whole app. But that's another issue)

idea 1:
If they got an informative error message, they might've stood a chance of going back to their training data and removing a very large image.

We could parse the error coming back from the VR API and returning a nicer version of it.

idea 2:
Presumably their training data was all/mostly URLs, so when we download an image to check it's accessible, we could try to check it's size - and reject super-large high-res images. That would stop this problem before it happens.

Update package.json to accurately reflect packages

I just tried to compule the application and got this error

/Users/adaniel/dev/taxinomitis/dist/lib/restapi/api.js
  5:22  error  "cors" is not found  node/no-missing-require

Looks like the application requires cors but it is not specified in the package.json

Automate creating new managed classes

Managed classes are currently created manually.

This involves:

  1. Creating a new entry in the tenants DB table, with the restrictions to be applied to the new class
  2. Creating Watson Assistant and Visual Recognition service instances and service credentials in IBM Cloud
  3. Creating new entries in the bluemixcredentials DB table, to store the newly created service credentials
  4. Creating a new user in Auth0 for the teacher
  5. Email the teacher with their new username/password

Steps 1 and 3 involve running manually written SQL queries against the live production DB.

This isn’t without risk. It’s also a time-consuming process that will only get more challenging to complete if the site popularity increases.

This should be automated, with a simple web interface for performing all of these steps in one easy go. The interface should be available only to site admins.

Allow model deletion windows greater than 10 days

Machine learning models are automatically deleted, after a configurable number of hours. This is explained in the Help page.

The number of hours before machine learning models are deleted is stored as an unsigned TINYINT in MySQL

taxinomitis/sql/tables.sql

Lines 166 to 167 in 9367390

textclassifiersexpiry TINYINT UNSIGNED NOT NULL DEFAULT 2,
imageclassifiersexpiry TINYINT UNSIGNED NOT NULL DEFAULT 1,

This means it has a maximum value of 255 (cf. https://dev.mysql.com/doc/refman/8.0/en/integer-types.html )

Today was the first time I was asked to set the deletion period to something bigger than this (30 days).

Automate sending notification emails

There are a number of emails that are sent to teachers (e.g. letting them know if one of their API keys looks invalid, explaining training errors due to insufficient IBM Cloud credentials, notifying them of unmanaged classifiers, etc.). These are currently sent manually, based on templates checked into the github project.

This process should be automated.

It’d be nice to have both HTML and plain text versions of the emails, and sending emails with both.

Write new grunt-based task runner

The existing gulp build is showing it's age and needs replacing.

The new version should:

  • Support istanbul for coverage
  • Distinguish between dev and prod output
  • Only clean dev output

Watson API Keys Non-Hidden Password

When entering the Watson API keys for Watson Assistant, when entering username/password credentials, the password field is not hidden. I have provided a picture below to demonstrate this.

screen shot 2018-08-22 at 15 07 22

In addition, when adding an API key for the Watson Visual Recognition, you are not given the choice to log in with username/password credentials - only an API key. Not sure if this is intentional, or an issue.

screen shot 2018-08-22 at 15 07 39

AppInventor support

https://twitter.com/Math_CS_Teach/status/1016001945641811970

image

MIT AppInventor is a bit Scratch-like but lets you build apps that can be deployed to Android devices. And according to this, soon to iOS devices, too.

In the same way that it was easy to add Python support by re-purposing the existing APIs for the Scratch extension, it might be worth looking into how AppInventor could drive the same API.

If it's not too complicated, it could be very nice to allow students to write machine-learning-powered apps that they can run on a mobile phone.

Scratch 2 doesn't include English as a language option

Reported by a user:

In Scratch, you can use the globe icon in the upper-left corner to set your desired interface language. But English isn't in the drop-down. So, if you set it to something else (being, naturally, a teen poking around and making trouble), there's no way to set it back to English short of clearing cookies.

Review and improve the ML quiz questions

The Models UI page displays a machine learning concepts multi-choice quiz for students to do while they're waiting for a model to train. This is particularly useful for images projects which can take 4-5 minutes to finish training a model sometimes.

The quiz questions were written in a hurry for the initial site release, with the plan that I'd come back and write some proper ones.

Except I mostly never did.

I should double-check if they're as bad as I suspect.

Adding new ones would be good, too - as I've seen students get through all of them and still have a minute to wait.

IGNORE_TENANTS should be stored in a DB

The list of tenants that use their Watson credentials outside of Machine Learning for Kids is growing, so the current hard-coded list in the code has become unwieldy. It should be moved into a new DB table, to make it easier to maintain.

Automated test

As the number of developers increases, it’s going to be important to make it easier for developers to make code contributions to the project.

The integration test that is currently being run manually using gulp should be extracted and made portable.

This means there will be a need for a test DB (either by running a test DB in Compose, or wrapping it in something that prepare a new local MySQL DB) and a test taxinomitis-numbers.

Admin option for deleting a class account

There is currently no way for teachers to delete their entire account. The Help pages offer that the workaround is for teachers to email me and I will do it for them. (Noone has ever taken me up on this). This is something I should remedy anyway. There should be a red "Delete everything" button that deletes everything in the DB associated with a class id.

This will need some new DB functions (to clear up DB rows associated with a class), new image store functions (to clear up images uploaded by a class), and new Auth0 functions (to delete user accounts that are members of a class, including finally the teacher requesting the delete themselves).

The UI will need to make it clear that this is unrecoverable / irreversible.

Handle browsers which block third-party cookies

Browsers which block third-party cookies are not able to log in.

This needs fixing.

Possible approaches:

  • Enabling custom domain support with auth0 (This isn’t free. It’s not clear whether this would be included in the Open Source Program)
  • Implementing a fall-back login page for these browsers
  • Displaying an error explaining that the user should enable third-party cookies

Apply for the Auth0 OSS program

I'm soon going to exceed the number of active users that is allowed on the Auth0 free tier. The OSS program looks like an appropriate way to address this, but I'll need to add an Auth0 badge to the login screen to be eligible.

Add NLS support to the UI

I've had a few offers to translate the UI - but can't accept them until I enable NLS support in the UI.

This will need to include the web UI text, the messages returned by the REST API that are currently displayed in the UI as-is, and the labels on the custom Scratch blocks.

Display confirmation when verifying email address

When a teacher clicks on the verify-email link in their welcome email, they go to auth0.com and are immediately bounced to machinelearningforkids.co.uk. They end up on the site home page (not logged in).

There have been a couple of teachers who didn’t realise they had successfully verified their email address. Some did this multiple times because of their confusion.

It would be good if they got a message on landing on the site to confirm their email address was verified.

Handle failures in pending jobs

At the moment, all pending job processing is stopped when one fails.

We could improve on this, so that other jobs can still be attempted if there is a single blip.

Document the public issue tracker

Now that the github issues list is available in public Github instead of private Github Enterprise, I could start pointing people at it as a way of reporting problems.

A link from the Help page to the issue tracker, and explaining that it is an option for reporting problems or requesting new features, would be enough to start.

Out of disk space crash

Crash in production :-(

This happened after a (very) large number of failed attempts to train an image machine learning model. (see #40 for background explaining why many of these happened... but not all - there were other reasons, such as VR API credentials being rejected, failure to download some images, etc. etc.).

The cause was that the disk space allocated to the Node.js app in Cloud Foundry was full. And the next call to downloadAndZip failed, because there was no room to write the zip file to.

{"name":"ml-for-kids","hostname":"bd45599a-9080-4613-44f3-cbe1","pid":49,"level":50,"err":{"message":"ENOSPC: no space left on device, write","name":"Error","stack":"Error: ENOSPC: no space left on device, write","code":"ENOSPC"},"stack":"Error: ENOSPC: no space left on device, write","msg":"Crash","time":"2018-07-04T07:26:53.334Z","v":0}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.