Ever thought traditional ML classes were boring? I had that thought many times when I was studying.
Now as a teacher, I’m searching for a way to make it more engaging. I really believe in hands-on education (make things, break things), so this year I designed “Building ML-powered applications” class for Harbour.Space. As the class is now over, I’ve collected my reflections on how to prepare for such class, how to teach it and when you should really prefer it to other options.
To briefly explain the class, we spent three weeks building two ML-backed applications. One is a telegram bot to generate audio descriptions of pictures in art museums, the other one is a game where you are trying to guess a song given a sequence of emojis representing the song’s lyrics. No lectures, no slides, just brainstorms, discussions and implementation. Just like an actual DS job - but fun and educational.
Step 1. Getting ready for the class
Project Selection and Breakdown
It doesn’t make sense to solve the same problem each time you teach this class, so you’re going to invent something new each time. Prepare by finding some idea for a project and breaking it down into a set of tasks. See how many students are going to attend and check that there are enough of them to tackle these tasks. Plot some diagram of your app, including all major parts.
Planning and MVP
Plan the project execution in advance. Think about building a quick & dirty MVP:
- How to mock your app in first couple of days, with no ML / data / or complex development?
- Which mocked parts you should replace with a real stuff first?
Classroom Goals
The project and your perspective on implementing it define what you’ll do in class. Here are some paths you could take:
- Deployment Focus: Want to go into deployment and monitoring, calculating business metrics and getting some users? Take something they can deploy on the first day of the class.
- ML Problem-Solving: Want to focus on tackling a challenging ML problem? Try to start from how this is going to be used - find a way to calculate metrics first and then gradually improve them, measuring the progress you’re making.
- Engineering Over Research: Want more engineering and less research? Don’t include any tasks you’re unclear how to solve.
One project vs many
Be cautious about the number of projects you’re going to bring to class.
- Having one project for everyone helps you align efforts and give an experience of working in a big team. If you start from scratch, this lets you produce more ready-to-use applications. This means that you will choose the project and design its roadmap.
- Having many projects may be a good idea if people want to bring their own projects to class, which implies you don’t need to come up with your own. This can be fun, but it makes it harder to involve people in common discussions (“I’m doing the other thing, so not interested“) and listen to in-depth updates of the work being done by other teams (lack of the context). And it’s harder for you to give specific feedback since you need to dive into each project separately.
There is also a possibility of choosing a single project, but splitting people in teams so each team builds their own interpretation of it. This is what I did one with a Hat Game and Art Price, but this requires middle/senior level (you need to achieve much with a small team) and works well in Hackathon setting (which is fun!).
Last check
Overall, when you come for the first day of the class, you should have a clear picture of the projects, its tasks and how you’re going to get the first version of your application that is worth playing around and sharing with some external folks.
Step 2. Teaching the class
The Classroom Dynamic
The preparation for the class can be pretty relaxed, but the class itself can be pretty tense, as you’re the one who owns the project and at the same time, you’re the one capable of helping in every problem. If you’re used to just reading lectures or showing demos (no homeworks or any activity you need to do after the class), this class can eat more of your time than you could expect. It’s paying off though: the more time you put into the class, the more you like the result.
Tailoring Your Approach
Depending on the level of students your focus is going to vary. If you have many junior DS students, you will be more busy organizing them and helping to resolve bugs and learn how to use some technology. If your students are more like middle DS, you’ll have more time to think strategically and drag team’s attention to planning on a higher level. In both cases, you should be everywhere, unblocking them and directing their efforts towards the right path. In fact, this is a team lead playground!
Managing Student Workload
Here are some strategies I found useful for managing the workload in a large class:
- Split students in teams so they can assist each other
- After you explained a problem solution to one student, direct all the next questions to him
- When a students faces a problem that can eat substantial amount of time, ask if someone who dealt with that problem before can help here instead of you
- When a student doesn’t achieve what he planned during a day, advise him to ask for help earlier
Planning and daily routine
Planning the work is essential to keep the pace and context for everyone, so I found useful common practices coming from agile:
- Start-of-the-day standup: what is everyone going to tackle today.
- End-of-the-day checks: did you achieve what you wanted? If not, what was the problem? How are you going to tackle it?
- Demo on each Friday (my class is three weeks): we show what we achieved and discuss that.
Connecting the pieces
To keep the common context and facilitate learning, I also found useful to often initiate small discussions about problems we face:
- We need to use vector search? Describe how it works and brainstorm how you should use it.
- We created a script that monitors that our telegram bot is online and responds to messages correctly. Where can we run it on hourly basis?
- We want to mock the app and deploy it. How can we mock it reasonably quick while still making it behave similar to a real prototype?
As usual, for the class to work well, you need to engage with students. It’s not a class where you can just give lectures and be okay if some students don’t pay much attention. This is the class where everyone should concentrate on delivering results. Students skipping tasks and making things in a lazy way can demotivate others, slowing you down.
Step 3. After the class
After spending a substantial number of hours on a project it makes it worth to share your results. I ask students to publish a blog post describing their work. See what my students published about Art Guide and lyrics2emoji. You can find links to other blog posts in READMEs of GH repos (art-guide, lyrics2emoji).
It’s great if students are interested in continuing to work on the project. There is always much more to do, so if you see any benefits, it’s worth considering. In Harbour Space students have to complete Capstone projects to graduate, so I’m asking them if they want to take this project and develop it further. This can open a number of possibilites for you and them, like presenting this on meetups or even local conferences, writing some articles, and presenting this as your pet project on the interview.
Pros and cons
As any educational experience, this has some pros and cons to it. Among pros I see:
- Hands-on approach to education makes it a better learning and lets students gain skills relevant to a daily tasks of DS specialist
- The real project gets students attention pretty well. I see students being interested in solving practical tasks and feeling responsible for their results.
- The task is going to be different each time. You should select something simple and interesting, but not trivial. This can be somewhat challenging, as you need to take into account different sides of the project.
- You are both product owner and team lead for the class (fun if you ask me). You tell how the application should look like, break it down into set of tasks, split students to work in teams, help tackle challenges and understand their role within the project.
- Adjustable complexity: every student can get the level of complexity he is up to.
There are some cons as well:
- This requires significant involvement for students, so it will work only if they’re willing to spend enough time on this
- It may be hard to come up with a good project that will satisfy all the requiments you have. I myself was concentrated on many things, including having some engaging ML task that goes beyond just using chatGPT - and this proved to be an additional challenge. It’s easier if you relax some of these requirements to see if students can learn useful things from the class still.
- Chance of drifting away from your goal. The less experience you have in building something similar, the more chances of drifting towards something you don’t want (like solving a research task) you have. The solution can be doing quick prototyping before the class.
- You should be super clear about how the app should look like. If you come to the class with no concrete plans, asking for a brainstorm, you can have a fruitful discussion, but it’s dangerous to leave the vision unclear after it finishes.
- You should be very responsible yourself. If you’re an owner & teamlead of the project done from scratch, nothing can fail it more than you.
Another important thing that isn’t good or bad on it’s own: interdependency between different parts of the project makes it easier to work for a shorter period of time, but more intensive (3 weeks x 4 hours a day, which is the case for Harbour.Space), than for a long period of time but less intensive (4 month x 4 hours a week, that’s a case we usually get in regular universities).
Conclusion: when to teach this class
When you want to have some fun for yourself. I see this as a pet project you can undertake for fun, while providing hands-on ML training to students. Something that’s fun and educational for everyone, including you. This may seem like an anti-pattern, but if the class isn’t engaging for you, it will be even less so for the students.
When you want to teach practical things. This class is a good fit if you want your students to acquire hands-on skills that they will remember and use. It’s also great for letting them build something worth sharing with friends, colleagues, or in job interviews.
When student levels match. This approach is effective for junior and mid-level students. Opting to build a single project together, instead of separate projects, allows them to achieve more and deal with the more complex work they will encounter in their jobs. If your students are closer to mid or senior-level, consider organizing a competition by proposing a more open-ended task and setting it up as a Hackathon.
Interested in revolutionizing ML education as well? Let’s collaborate. Reach out to me, and let’s discuss how we can make project-based learning the standard.