Michael Kennedy: In 2020, a gastroenterologist in Glasgow did the math on his new research study and came up with
Michael Kennedy: 30,000 samples arriving over two years from three cities and dozens of hospitals.
Michael Kennedy: He asked around about how researchers kept track of that. The answer was Microsoft Excel.
Michael Kennedy: Sean Chua had written some HTML by hand in Notepad way back in high school. That was about the
Michael Kennedy: entirety of his programming experience. Even so, he opened the Django tutorial and started reading.
Michael Kennedy: Six years later, that app is Foundry 120, holding 10 terabytes of clinical and genomics data with
Michael Kennedy: agentic AI running on top of it. This is Talk Python To Me, episode 560, recorded August 26th,
Music: 2026. Talk Python To Me. Yeah, we ready to roll. Upgrading the code. No fear of getting old.
Music: Async in the air. New frameworks in sight. Geeky rap on deck. Quartz crew. It's time to unite.
Music: We started in Pyramid, cruising old school lanes, had that stable base, yes sir.
Michael Kennedy: Welcome to Talk Python To Me, the number one Python podcast for developers and data scientists.
Michael Kennedy: This is your host, Michael Kennedy.
Michael Kennedy: I'm a PSF fellow who's been coding for over 25 years.
Michael Kennedy: Let's connect on social media.
Michael Kennedy: You'll find me and Talk Python on Mastodon, Bluesky, and X.
Michael Kennedy: The social links are all in your show notes.
Michael Kennedy: You can find over 10 years of past episodes at talkpython.fm.
Michael Kennedy: And if you want to be part of the show, you can join our recording live streams.
Michael Kennedy: That's right.
Michael Kennedy: We live stream the raw uncut version of each episode on YouTube.
Michael Kennedy: Just visit talkpython.fm/youtube to see the schedule of upcoming events.
Michael Kennedy: Be sure to subscribe there and press the bell so you'll get notified anytime we're recording.
Michael Kennedy: Let me quickly tell you about a new course we have running over at Talk Python.
Michael Kennedy: Up and running with Rust.
Michael Kennedy: The tools reshaping how you write Python, Ruff, uv, Firefly, ty, Pixie, and others.
Michael Kennedy: and the libraries pushing past its performance ceilings.
Michael Kennedy: Polars Pydantic, Cryptography, and Granian
Michael Kennedy: increasingly share one secret under the hood.
Michael Kennedy: They're written in Rust.
Michael Kennedy: That code that used to be written in C
Michael Kennedy: when Python needed real speed now
Michael Kennedy: is more and more being written in Rust.
Michael Kennedy: So having some Rust proficiency is a great skill
Michael Kennedy: as a Python developer.
Michael Kennedy: Christopher Trudeau is back
Michael Kennedy: with the Up and Running with Rust course.
Michael Kennedy: Check it out over at talkpython.fm.
Michael Kennedy: Just click it courses in the top and you'll find it right there.
Michael Kennedy: I hope you love this new Rust course.
Michael Kennedy: Getting a course at Talk Python is one of the best ways to support the show.
Michael Kennedy: This episode is brought to you by Sentry.
Michael Kennedy: You know Sentry for the error monitoring, but they now have logs too.
Michael Kennedy: And with Sentry, your logs become way more usable,
Michael Kennedy: interleaving into your error reports to enhance debugging and understanding.
Michael Kennedy: Get started today at talkpython.fm/sentry.
Michael Kennedy: And it's also brought to you by Talk Python Courses.
Michael Kennedy: Course completion certificates are now live.
Michael Kennedy: If you finished a course, there's a certificate waiting for you on your account page right now.
Michael Kennedy: Download it as a PDF or add it to your LinkedIn profile with one click under licenses and certifications.
Michael Kennedy: Same section as your formal degrees.
Michael Kennedy: Visit training.Talk Python.fm account to see what you've already earned.
Michael Kennedy: John, welcome to Talk Python To Me.
Michael Kennedy: How are you doing?
Michael Kennedy: Great.
Shaun Chuah: Thanks very much, Michael.
Shaun Chuah: A big fan of the show.
Shaun Chuah: Keen to be here to share a few things of what we've learned.
Michael Kennedy: Amazing. Thank you so much. And now you're here creating the show. It's going to be amazing.
Michael Kennedy: And you're doing really interesting work with biological and medical research, Python,
Michael Kennedy: Django, AI. I think there's a lot of cool things that we're going to dive into here. So
Michael Kennedy: I know even for people who are not in medical research, I think there's going to be some
Michael Kennedy: super interesting angles that will translate for them.
Shaun Chuah: Fantastic. Looking forward to it.
Michael Kennedy: Now, before we dive into that, as usual, just tell people about yourself.
Michael Kennedy: Who are you?
Shaun Chuah: So I'm Sean.
Shaun Chuah: I'm a gastroenterologist, and I'm a clinical researcher as well.
Shaun Chuah: So my primary area of practice is in the field of inflammatory bowel disease that comprises
Shaun Chuah: ulcerative colitis and Crohn's disease as the kind of conditions that we deal with when
Shaun Chuah: we see patients in clinic.
Shaun Chuah: But in parallel, I also work in research, trying to find out the causes of these conditions
Shaun Chuah: together with the GUT Translational Research Group here at the University of Glasgow.
Shaun Chuah: Personally, for this podcast, we use Python a lot in our work, both for research,
Shaun Chuah: so trying to analyze the data that we're doing, but also as well as for the infrastructure that
Shaun Chuah: we're running. So how do we actually deliver the research studies that we have to deliver?
Shaun Chuah: And personally, as a researcher, I've also got an interest in agentic AI and machine learning,
Shaun Chuah: and that's what attracted me to try to use some of these techniques to see if we can find
Shaun Chuah: new breakthroughs that can bring, you know, new treatments for our patients that we see in clinic
Michael Kennedy: every day. Awesome. Very cool research. That's the kind of stuff that can make a big difference
Michael Kennedy: for people's lives. If you can make them better, right? It's like, I couldn't leave the house,
Michael Kennedy: but now I'm back with my friends or whatever, right? Yeah. I mean, you know, the work that we
Shaun Chuah: do is motivated in the patients that we see day to day. Inflammatory bowel disease is not very
Shaun Chuah: common. It is rare, but it is growing not just in developed countries, but also in the developing
Shaun Chuah: world. And we see a great burden of this disease coming the next 10 to 20 years. What do you think?
Michael Kennedy: Diet? Environment? Why is it growing? Obviously, that's the research a little bit, right? But
Michael Kennedy: what is your ideas here? Well, these are really complex conditions, and the environment is
Shaun Chuah: absolutely a major player in this. The diet that we're eating nowadays is different from what we
Shaun Chuah: used to eat. But when we dive into the science of it, it's a lot more complex than just that.
Shaun Chuah: There are some patients who have genetic susceptibility, although not all. And we know
Shaun Chuah: that there is this problem that happens when the immune system reacts to our environment. And for
Shaun Chuah: some reason, the alarms don't switch off and the inflammation keeps happening, which leads to the
Michael Kennedy: symptoms and the problems that we see every day in clinic. So let's start by examining all the
Michael Kennedy: the research and the work you did and maybe the 2020 version of your research projects.
Michael Kennedy: It all started with Django, right?
Shaun Chuah: Yes.
Shaun Chuah: So back in 2020, I was still training as a gastroenterologist.
Shaun Chuah: So over here, we do a period of registrar training, we call it.
Shaun Chuah: And as part of my developing interest in understanding these medical conditions, I sign up to do a
Shaun Chuah: research study with one of the principal investigators.
Shaun Chuah: And the proposed study was basically to recruit quite a few patients from three different cities,
Shaun Chuah: multiple hospitals, and collect extra samples that we can run science experiments on to work
Shaun Chuah: out what's going on with an immune system. So when we first started, that was 2020. And I know
Shaun Chuah: we all remember that in 2020, you know, we had COVID and COVID had a significant impact both on
Shaun Chuah: hospital operations, but also on research operations. And when I sat down to look at
Shaun Chuah: what we were supposed to do in terms of the research studies, the first challenge that I
Shaun Chuah: faced was calculating the number of samples we were going to do. So we were going to recruit about
Shaun Chuah: 200 people and we're going to follow them up every three months. And at every time point,
Shaun Chuah: we would take extra blood samples, extra stool samples, and saliva samples. So that was a lot
Shaun Chuah: of extra samples and a simple back of the envelope calculation came to about 30,000 samples that we
Shaun Chuah: were going to generate over a couple of years. Now, when I first saw that challenge, I started
Shaun Chuah: asking everybody around me, how are we going to keep track of all that? How are we actually going
Shaun Chuah: to deliver that problem? How do we solve that problem? And from my chat with a lot of people,
Shaun Chuah: the common way that researchers track the samples is to use Microsoft Excel.
Michael Kennedy: That's exactly what I was thinking is like, how big is the Excel file?
Michael Kennedy: And, you know, how many little worksheet tabs does it have?
Shaun Chuah: Yeah, I mean, most research teams do not really have a lab system because lab systems, you
Shaun Chuah: know, enterprise software, which is really expensive to procure, it'll take you like
Shaun Chuah: six months to set it up.
Shaun Chuah: And it's usually designed really for hospital operations where you're taking, you know,
Shaun Chuah: millions of samples.
Shaun Chuah: And it's not really designed for a one-off research study across a lot of different spaces.
Shaun Chuah: So then I started looking into what are the, you know, are there off the shelf options or
Shaun Chuah: stuff that we could use to just get up and running?
Shaun Chuah: But after looking at a few different options, I think I had to bite the bullet and decided
Shaun Chuah: that, you know, the best thing was to go and write a web application with Django.
Michael Kennedy: What was your programming experience at this point?
Michael Kennedy: How good of a programmer were you?
Shaun Chuah: So I wasn't very good of a programmer.
Shaun Chuah: I mean, what I did was basically, you know, write some websites in high school.
Shaun Chuah: And back in those days, we used to use Notepad.
Shaun Chuah: We used to open the brackets of HTML manually by hand.
Michael Kennedy: It was rough.
Michael Kennedy: Those were tough times, I remember.
Shaun Chuah: Yeah, I don't know how many people listening to this podcast can relate.
Shaun Chuah: But we used to write, you know, the head, the body and stuff.
Shaun Chuah: And then later on, I did use a bit of programming to do some, you know, statistics, a bit of,
Shaun Chuah: writing an R script or a Python script just to generate a graph.
Shaun Chuah: So that's probably that level of programming experience when I was
Shaun Chuah: looking at how do we actually write a web app with Django.
Michael Kennedy: Yeah, okay. So a Django web app was kind of a
Shaun Chuah: pretty big stretch at that point, right? Yes, but the Django...
Michael Kennedy: How'd you get started? I mean, this predates all the AI, agentic stuff.
Michael Kennedy: You had to earn it for this one. Yeah, definitely. I mean, when I first
Shaun Chuah: visited a Django website. It's the web framework for perfectionists with deadlines. And I think
Shaun Chuah: that described exactly what a situation I was in. You know, I came out program and we had about a
Shaun Chuah: two year time period to deliver a study. And you can't spend forever trying to get this up and
Shaun Chuah: running. You just have to get the study going. So the Django tutorial was where I started. But
Shaun Chuah: actually, I just want to take this opportunity to thank a lot of people in the community and those
Shaun Chuah: listening because it's the documentation, the YouTube tutorial, your podcast. I've been listening
Shaun Chuah: for five years. Books that were written, Two Scoops of Django, famously. I read a ton of books just
Michael Kennedy: to be able to get things up and running. Yeah, the books are great. And honestly, YouTube is really
Michael Kennedy: good. People knock YouTube for many reasons. You know, it's one of the ills of social media that's
Michael Kennedy: like scrambling their brains. But if you use YouTube for education, it's an incredible resource.
Shaun Chuah: Yeah. I mean, there are a lot of creators on YouTube that are just, you know, teaching lots
Shaun Chuah: of different things. And it's so helpful. But I also think some of the textbooks are great, you
Shaun Chuah: know, for things like test-driven development. You know, back in the days, I think you would only
Shaun Chuah: read about it in textbooks rather than on YouTube videos because it's not really an attractive topic.
Michael Kennedy: Yeah, you mentioned Obey the Testing Goat, which is a really fun book. And you also talked about
Michael Kennedy: using designing data-intensive applications. And that's by Martin Klepman. I haven't heard of that
Michael Kennedy: That's a pretty interesting one that people might want to check out.
Shaun Chuah: Yeah, down the line, as our studies matured and we started dealing with the data, I started
Shaun Chuah: reading some of the other data textbooks like Data Warehouse Toolkit by Kimball.
Shaun Chuah: I think that's the one that all data engineers used to talk about dimensional modeling and
Shaun Chuah: all that kind of stuff.
Shaun Chuah: So lots of textbooks.
Shaun Chuah: I think they're really helpful because they give you a kind of a holistic, fundamental
Shaun Chuah: approach to learning the basics and making sure you don't have gaps in what you're doing
Shaun Chuah: to build some of these things.
Michael Kennedy: When you come from the background of programming that you did,
Michael Kennedy: which, by the way, that's a very similar story to me as well.
Michael Kennedy: I studied math, and then I got involved helping people
Michael Kennedy: with research projects and working for a scientific research
Michael Kennedy: and visualization company.
Michael Kennedy: So you kind of build up the pieces as you go,
Michael Kennedy: and it's super fun.
Michael Kennedy: It's really neat.
Michael Kennedy: But there's a lot of gaps in your sort of data integrity,
Michael Kennedy: programming, like what is the foreign key relationship?
Michael Kennedy: All that.
Michael Kennedy: Yeah, yeah.
Michael Kennedy: So I think books are really important,
Michael Kennedy: especially for self-taught people like us.
Michael Kennedy: Definitely, definitely.
Shaun Chuah: You do learn a lot as you go.
Shaun Chuah: And it's quite important to be aware of what you don't know
Shaun Chuah: and try and close those gaps
Shaun Chuah: so that the applications that you write
Shaun Chuah: end up being reliable enough for people to depend on.
Michael Kennedy: Let's talk about Django for a second
Michael Kennedy: because you shouted out, Django,
Michael Kennedy: some of the features of it that kind of made that possible.
Michael Kennedy: I think this is one of the reasons that people choose Django, especially when they're getting started.
Michael Kennedy: You know, it's like it's got the built-in migrations.
Michael Kennedy: It's got the automatic database management, the admin.
Michael Kennedy: So what was it about Django that drew you to this?
Shaun Chuah: So I think, you know, when we looked at the landscape back in 2020, Django definitely stood out because it was a mature project.
Shaun Chuah: It's been around for a long time and it's batteries included, which is really important because, you know, I'm conscious that, you know, as a non-programmer coming into trying to write these things,
Shaun Chuah: You want your authentication framework to be battle tested.
Shaun Chuah: Database and migration is incredibly important.
Shaun Chuah: You can't lose any data.
Shaun Chuah: And I think just on those two features alone,
Shaun Chuah: we haven't even come to the admin dashboard,
Shaun Chuah: but just those two features alone,
Shaun Chuah: I think was enough to persuade me that Django is the right framework
Shaun Chuah: for the problem that we're dealing with.
Michael Kennedy: Okay, very interesting.
Michael Kennedy: And by the way, just big news for Django folks.
Michael Kennedy: Is it on their blog, maybe?
Michael Kennedy: Big news for Django is they just announced
Michael Kennedy: that they're switching the Django long-term support
Michael Kennedy: to yearly releases, just like Python itself,
Michael Kennedy: and calendar version.
Michael Kennedy: So there'll be Django 2028, Django 2029,
Michael Kennedy: and every single release is a long-term support,
Michael Kennedy: whereas now you're kind of juggling like,
Michael Kennedy: well, 5.2 is a long-term, but the one before it.
Michael Kennedy: I think that'll also make it a little simpler
Michael Kennedy: for people who are coming,
Michael Kennedy: like they don't have to decipher the versioning
Michael Kennedy: and what it means.
Michael Kennedy: Definitely, yep.
Michael Kennedy: Yeah, yeah, that'd be cool.
Michael Kennedy: What else?
Michael Kennedy: What else did you run into trying to navigate this world of becoming, running one of these
Michael Kennedy: like real web apps rather than just Excel or buying some off the shelf, you know, square
Michael Kennedy: peg round hole type of system that doesn't really fit what you're trying to do?
Shaun Chuah: Yeah, I mean, I think one of the steep learning curves is how do you go from a local host
Shaun Chuah: development project into something that's in production?
Shaun Chuah: Because production is obviously a whole different ballgame.
Shaun Chuah: you need to ensure your infrastructure in production is reliable.
Shaun Chuah: It's secure. It's accessible.
Shaun Chuah: You've got backups running, all sorts of things.
Shaun Chuah: And for us, one of the key things that enabled us
Shaun Chuah: is continuous integration and continuous deployment practices.
Shaun Chuah: So using GitHub Actions to deploy continuously
Shaun Chuah: so we can fix problems, get it into production in minutes
Shaun Chuah: rather than trying to do any of these things by hand manually.
Michael Kennedy: Yeah, the CI-CD stuff, I think, is really valuable.
Michael Kennedy: It's valuable for big teams, but it's also really valuable for people who are really new.
Michael Kennedy: Because if all I have to do is save my work to GitHub, and now that's the new stuff that's out there.
Michael Kennedy: That takes a lot of the complexity out.
Michael Kennedy: People forget just how intimidating logging into a Linux computer is.
Michael Kennedy: Oh, yeah.
Michael Kennedy: Now what?
Michael Kennedy: Yeah?
Shaun Chuah: Yeah, I had to learn how to use Linux on a terminal, right?
Michael Kennedy: Exactly.
Michael Kennedy: It was like, where is the UI?
Michael Kennedy: This is very different.
Michael Kennedy: How am I supposed to accomplish anything with just the terminal?
Michael Kennedy: And, you know, you get used to it and it's amazing in its own special way,
Michael Kennedy: but it doesn't feel amazing at the beginning most of the time, I think.
Shaun Chuah: Well, I'm reminded of the...
Shaun Chuah: It feels intimidating.
Shaun Chuah: Yeah.
Shaun Chuah: Every time I teach somebody how to use the Linux or the terminal,
Shaun Chuah: it's a big jump, I think, for people who are not familiar with CLI,
Shaun Chuah: which is, I think, the vast majority of people in the population.
Michael Kennedy: Yeah.
Michael Kennedy: Well, and things like people being primarily on phones for their computing device
Michael Kennedy: don't make that easier. It's only harder, right? This portion of Talk Python To Me is brought to
Michael Kennedy: you by Sentry. You know Sentry for their great error monitoring, but let's talk about logs.
Michael Kennedy: Logs are messy. Trying to grep through them and line them up with traces and dashboards just to
Michael Kennedy: understand one issue isn't easy. Did you know that Sentry has logs too? And your logs just became
Michael Kennedy: way more usable. Sentry's logs are trace connected and structured, so you can follow the request flow
Michael Kennedy: and filter by what matters.
Michael Kennedy: And because Sentry surfaces the context
Michael Kennedy: right where you're debugging,
Michael Kennedy: the trace, relevant logs, the error,
Michael Kennedy: and even the session replay all land in one timeline.
Michael Kennedy: No timestamp matching, no tool hopping.
Michael Kennedy: From front end to mobile to backend,
Michael Kennedy: whatever you're debugging,
Michael Kennedy: Sentry gives you the context you need
Michael Kennedy: so you can fix the problem and move on.
Michael Kennedy: More than 4.5 million developers use Sentry,
Michael Kennedy: including teams at Anthropic and Disney+.
Michael Kennedy: Get started with Sentry logs and error monitoring
Michael Kennedy: today at talkpython.fm/sentry. Be sure to use our code talkpython26. The link is in your
Michael Kennedy: podcast player show notes. Thank you to Sentry for supporting the show. Let's talk about your project
Michael Kennedy: Boundary 120. So when you started, you built this bespoke Django app for, was this for the music
Michael Kennedy: study or which study was this for? This was for the music IBD study. And the first version was
Shaun Chuah: really to track samples and to come up with an efficient way for our teams to handle the, you
Shaun Chuah: know, the 30,000 that we are projecting to sort out. So one of the key functionalities that we
Shaun Chuah: wrote in at the start was this ability to, you know, stick a QR code, stick it onto a sample
Shaun Chuah: label, scan it in, and that will register it into a database. And then we could move the sample
Shaun Chuah: around between sites and scan it and update. So that's where it started out as a sample tracking
Shaun Chuah: platform. So nothing too amazing. It was just kind of a really basic operational problem that just
Shaun Chuah: needed to be solved. But over time, when you get samples, the next thing that happens to the sample
Shaun Chuah: is that it gets processed into an experimental pipeline and you get data out of it. So the
Shaun Chuah: lifecycle of an experimental sample then leads you on to dealing with the data that comes back.
Shaun Chuah: Now, because we were taking so many different types of samples, one of the key challenges that
Shaun Chuah: faced our team was how do you handle the data that was coming back at us? Because we have stool
Shaun Chuah: samples that becomes, you know, microbiome data. We have blood samples that become genomics data.
Shaun Chuah: And every data type that comes back just looks a little bit different, comes back in different
Shaun Chuah: formats, you know. And one of the difficulties as well is the size of the data that we get.
Shaun Chuah: So for my personal research project during that time, I was looking at sequencing out the cell-free
Shaun Chuah: DNA. So the DNA fragments that you have floating around your blood and each sequencing file for a
Shaun Chuah: participant will be about five to 10 gigabytes of data. And it comes back in a, you know,
Shaun Chuah: in a fast QGZ format, and that has to go into a bioinformatic pipeline. So it's the one of the
Shaun Chuah: key challenges is how we build that data. So Foundry 120 actually became a project that
Shaun Chuah: started from sample tracking into data management and handling. And in 20, you know, in the last year
Shaun Chuah: too, it's also become a platform where we can apply agentic AI into it to kind of accelerate
Michael Kennedy: our workflows. Yeah, it's a really neat platform. And I'm definitely going to dive into it. I think
Michael Kennedy: it's neat how you had this smaller bespoke thing and you're like, all right, let's sort of pull
Michael Kennedy: out the essence of it and make it useful for all kinds of scientific research. Going back to the
Michael Kennedy: samples. You said each one is five to six gigabytes. That's each of the 30,000?
Shaun Chuah: Not all the 30,000. So a subset of them, but it depends on what essays were being run on which
Shaun Chuah: samples. And there could be a ton of essays all running different types of samples. And each of
Shaun Chuah: them will have their own data type that comes back. So for my cell-free DNA work, we ran it on a subset
Shaun Chuah: of the population, not the entire population.
Shaun Chuah: But for some of the other larger scale things like genotyping, we would genotype the whole
Shaun Chuah: population.
Shaun Chuah: So there are lots of moving parts and tiny little details here that cause so much operational
Shaun Chuah: problems.
Michael Kennedy: That's a lot of data.
Michael Kennedy: Where did you, how much did you end up with at the end and how did you store it and manage
Michael Kennedy: it?
Shaun Chuah: So currently we have about 10 terabytes of data and we've only, you know, processed only
Shaun Chuah: a fraction of those 30,000 is still being processed because some pipelines takes a human
Shaun Chuah: 12 hours to process a couple of samples. So there's still a lot of work to be done.
Shaun Chuah: But yeah, it's about 10 terabytes of data that we're handling. And initially, it would be scattered
Shaun Chuah: across our group. Somebody's doing a microbiome project, it would be on their laptop. Otherwise,
Shaun Chuah: it'd be on a shared drive, on a file share somewhere in the university server. So data
Shaun Chuah: tends to be scattered. So if somebody is doing a specific experiment, they might create an Excel
Shaun Chuah: file with the readings from certain essays, and that would be the data set. And that's, I think,
Michael Kennedy: one of the big problems that we face in biomedical research today. Yeah, that's a lot of data. Are
Michael Kennedy: using things like blob storage? I know this Foundry 120 project is pretty strongly based in
Michael Kennedy: the Azure cloud. Are you using Azure blob storage and stuff like that? Or is it really just all on
Michael Kennedy: on-premise with regard to the university?
Shaun Chuah: So back in the days, that was the situation that we were in.
Shaun Chuah: But today, we're now migrated everything into Azure Blob Storage.
Shaun Chuah: That just gives us a scalable way of not worrying, you know,
Shaun Chuah: how much space we had in our shared drives.
Shaun Chuah: Because back in the days, you know,
Shaun Chuah: the university would give you a quota on your shared drive
Shaun Chuah: and you have to email somebody in IT to get it increased.
Shaun Chuah: So you might have a terabyte cap on your file share.
Shaun Chuah: But with Azure Blob Storage, what you end up having is just a bill at the end of the month rather than hard limits.
Michael Kennedy: You have a bill instead of a limit.
Michael Kennedy: Yeah, yeah, yeah.
Michael Kennedy: Interesting.
Michael Kennedy: When I was working way back when I was in college, in university, working in this math research lab.
Michael Kennedy: I told this story a couple of times, but it's been a while, so maybe I'll share it again.
Michael Kennedy: And the whole of the math research department got access to the Silicon Graphics mainframe
Michael Kennedy: beast of a computer.
Michael Kennedy: We all had shared sort of workstation access to it.
Michael Kennedy: And one of the students, grad students, was having a problem with their code.
Michael Kennedy: And so they started logging out what it was doing.
Michael Kennedy: And they got it into an infinite loop and ran it.
Michael Kennedy: You would run stuff overnight and come see it in the morning.
Michael Kennedy: We came back one day and it just wouldn't turn on or it wouldn't respond.
Michael Kennedy: And nobody could figure out why.
Michael Kennedy: The students, we had no, the reason I'm telling you this, we had no quotas, no limits.
Michael Kennedy: The student used up the entire hard drive of the Silicon Graphics machine to the very last
Michael Kennedy: byte, and apparently it needed a few temp files to operate the operating system.
Michael Kennedy: And it just died.
Shaun Chuah: And nobody could get it to come, it took a day or two for it to come back because somebody
Michael Kennedy: destroyed it.
Michael Kennedy: Well, these limits, they have a reason they're there, you know?
Shaun Chuah: They do.
Shaun Chuah: But when we look at the next five to 10 years of biomedical research, file storage is actually a big problem.
Shaun Chuah: Is it? Okay.
Shaun Chuah: Some of the newer technologies are generating like a terabyte of data for a single sample.
Michael Kennedy: Wow. Yeah, that's absolutely crazy.
Michael Kennedy: You know, this also goes to reproducibility and long-term viability of this research, right?
Michael Kennedy: Because if you have 100 terabytes of data, it's one thing to say, well, here's the Excel file and here's the Parquet file and here's the Docker image that runs it.
Michael Kennedy: Save that as a, you know, you can stamp these as like, here's what the paper was published on, right?
Michael Kennedy: And here's the digital assets.
Michael Kennedy: But when it's 100 terabytes, it doesn't matter if you can name it or not.
Michael Kennedy: That's a hard thing to store.
Shaun Chuah: Yes, definitely a big problem.
Shaun Chuah: And I think the question then becomes what is the most valuable data that you store?
Shaun Chuah: because perhaps you don't need to store the raw files
Shaun Chuah: and you want to process files
Shaun Chuah: because who wants to run another 100 terabyte pipeline anyway?
Shaun Chuah: But yeah, these are challenging questions.
Shaun Chuah: There are no easy answers.
Shaun Chuah: And most groups, we do cost our data storage,
Shaun Chuah: but for most grants, we cost it out for 10 years.
Shaun Chuah: And beyond that, it becomes a challenge to maintain all this data.
Michael Kennedy: Yeah. What are you going to do?
Michael Kennedy: I guess the only bonus is in general
Michael Kennedy: that storage is getting cheaper by a lot.
Michael Kennedy: And I say by in general,
Michael Kennedy: because the last couple of years
Michael Kennedy: or last year and a half, that's not true.
Michael Kennedy: Yeah, I was going to say the AI revolution
Shaun Chuah: might not keep that falling price curve the same.
Michael Kennedy: It might change things just a little bit.
Michael Kennedy: All right, so let's talk about this Foundry project.
Michael Kennedy: So this is sort of the next generation
Michael Kennedy: of what you maybe dreamed of building.
Michael Kennedy: Also maybe a little bit in the agentic age as well, right?
Michael Kennedy: Yeah, definitely.
Michael Kennedy: Okay, so tell us about this Foundry 120.
Michael Kennedy: So Foundry 120.
Michael Kennedy: People will find it at foundry120.com.
Shaun Chuah: It's a research operating system for translational science teams.
Shaun Chuah: So I've got to explain that a bit.
Shaun Chuah: So translational science is basically when you're trying to discover things by recruiting
Shaun Chuah: humans with a problem and you're taking samples, bringing them back to the lab and running all
Shaun Chuah: sorts of experiments to just kind of understand the biology behind disease and then find out
Shaun Chuah: whether there are mechanisms that we can target for therapeutic development and things like that.
Shaun Chuah: So that's kind of translational science.
Shaun Chuah: And Foundry 120 is a platform that allows teams to operate seamlessly
Shaun Chuah: and use AI to accelerate their workflows.
Shaun Chuah: It's built around three ideas.
Shaun Chuah: The first idea is to organize everything.
Shaun Chuah: So you organize your samples, your studies, your participants into a database
Shaun Chuah: that just helps you keep track of everything.
Shaun Chuah: And then the second bit is the idea of centralizing all your data outputs into a single platform.
Shaun Chuah: So this will be things like clinical data, including radiology images, endoscopy videos,
Shaun Chuah: digital pathology slides, and then the scientific outputs such as spatial transcriptomics,
Shaun Chuah: genomics, microbiome, or all the data volume that we're seeing from all the different scientific
Shaun Chuah: modalities are just going up exponentially. But as we know in the AIH, if you can bring all your
Shaun Chuah: context into a single platform, then you can let AI connect to that and operate on that to answer
Shaun Chuah: questions that researchers might have. So, I mean, I'll give you a concrete example. For example,
Shaun Chuah: you know, if one of my scientific colleagues were looking for, you know, do we have any samples that
Shaun Chuah: belong to a participant who's been treated with this drug? Can we find that? And historically,
Shaun Chuah: what you would have to do is to take the clinical data set, join it with your sample database,
Shaun Chuah: and then filter that through and find the samples that you want. And that usually would have taken
Shaun Chuah: a couple of days to do. But this is a great use case, I think, for agentic AI, where you can just,
Shaun Chuah: you know, access the data, put it into a sandbox, write the code to do the join, and then just give
Shaun Chuah: you the answer that you want. So just eliminate all the steps in between and get you to the answer
Michael Kennedy: faster. And that's the whole concept behind the platform. Sounds great. It's a really nice looking
Michael Kennedy: web app too. What's its current status? It's available not just for you all, but for others,
Michael Kennedy: but it doesn't have quite a just create an account, get started. So you have a request a platform
Michael Kennedy: walkthrough. What's the situation here? Can other research teams use it? Is it a paid product? Is it
Michael Kennedy: just sort of gated because it's not ready for people overwhelming it? So it's quite early stage
Shaun Chuah: at the moment. So over the last six to 12 months, we've made the entire foundation generalizable
Shaun Chuah: beyond just our group and beyond just disease. So what I mean by that is, you know, for another
Shaun Chuah: group to join, they would need the access controls to be in place. So they need a way of managing
Shaun Chuah: their team, being able to assign permissions to individuals, you know, without me having to do it
Shaun Chuah: But I think more importantly is that onboarding a team into this platform is actually quite a hands-on process because it really depends on what data you're handling, the volumes that you're dealing with, what modalities of data you need to do.
Shaun Chuah: And also the other major thing that we have to look at if you want to join the platform is the governance around your data.
Shaun Chuah: So in clinical research, there are strict rules around how you handle data and where that data can sit, where can it be processed.
Shaun Chuah: And these are subject to your research ethics approval.
Shaun Chuah: So before a team can join us, we do want to review all those things to make sure that we're in compliance before anybody can join.
Shaun Chuah: So that's the reason why it's not just a simple, you know, I can sign up, pay a monthly fee and start using the platform.
Shaun Chuah: There's a lot more issues that have to be looked at before we can bring a team on board.
Shaun Chuah: But we're willing to do the work to kind of review the situation and start getting other people access to it.
Michael Kennedy: Makes a lot of sense.
Michael Kennedy: You've got IRB research stuff.
Michael Kennedy: You've got HIPAA and the equivalent in all the other countries.
Michael Kennedy: And yeah, so you don't want to get in trouble.
Shaun Chuah: Yes.
Shaun Chuah: And you did mention earlier that this is quite tied into Azure at the moment.
Shaun Chuah: And that's because we run on the University of Glasgow's Azure Tenancy.
Shaun Chuah: So everything has to be located specifically for our studies within the UK data centers and things.
Shaun Chuah: So we have all the controls in place to do that.
Shaun Chuah: And that's backend infrastructure for the people who are listening on the podcast.
Michael Kennedy: This portion of Talk Python is brought to you by Talk Python Courses.
Michael Kennedy: Here's the thing that always bug me.
Michael Kennedy: You finish one of our courses, that's hours of video, a pile of code you actually wrote,
Michael Kennedy: and real skills you didn't have a month before, and then nothing happens.
Michael Kennedy: No paper, no credential, nothing to show for it.
Michael Kennedy: So we fixed it.
Michael Kennedy: Every Talk Python course now generates a completion certificate automatically.
Michael Kennedy: Go to your account page in your dashboard section,
Michael Kennedy: scroll down to your completed courses, and click Certificate.
Michael Kennedy: That's the whole process.
Michael Kennedy: Two things you can do with these course completion certificates.
Michael Kennedy: download the full PDF, which is handy if your employer reimburses training or gives you credit
Michael Kennedy: for finishing it. Or you can make the certificate public and hit share on LinkedIn, which adds it to
Michael Kennedy: your LinkedIn profile under licenses and certifications. Not a poster that scrolls away
Michael Kennedy: in a day, an actual credential sitting on your profile where your manager and recruiters can see
Michael Kennedy: it. Plus, if you've been taking our courses for a while, you've probably earned several of these
Michael Kennedy: without even knowing they existed. Just visit training.talkpython.fm/account and collect
Michael Kennedy: them. Thanks to all of you who have taken a Talk Python course. It's a great way to support the podcast.
Michael Kennedy: What a different time it is for universities. And I think they're going through a similar
Michael Kennedy: upheaval, I guess is the word. When I was in university, and we're talking like 90s,
Michael Kennedy: there was a giant Cray supercomputer or maybe a couple of supercomputers at the heart of the
Michael Kennedy: university in some basement, and you could get access to that if you needed mega computing
Michael Kennedy: resources. And now it's just scaled into some ginormous cloud infrastructure. And the limit
Michael Kennedy: is really just how much are they going to give you, not what does the university have in its
Michael Kennedy: basement or something like that, which is really interesting. Well, I mean, there are still some
Shaun Chuah: universities that are trying to build their own clusters. But I think if you look at the economics
Shaun Chuah: of it, it is way more cost efficient to be running on the cloud compared to on the cluster, because
Shaun Chuah: many of the analysis that we do in the universities once off. So you might process a ton of data,
Shaun Chuah: but that might be after a year or two years before you get that amount of data to process.
Shaun Chuah: So if you look at a workload, the IT workload within the university, I think the cloud is
Shaun Chuah: quite an attractive proposition. That's an interesting angle. Yeah, of course, because
Michael Kennedy: you're going to process your samples. Maybe you're like, ah, we really want to try a different
Michael Kennedy: algorithm and you'll run it all through again. But generally speaking, it's not steady state.
Michael Kennedy: Whereas if you're going to go buy your own hardware and then put it in a basement and it's kind of a steady state situation, then you could really predict, you know, we're saving, you know, 50% less expensive to run on this.
Michael Kennedy: And just, yeah, didn't really think about that.
Michael Kennedy: And so I said, there's another such wave coming because this was, you know, when was the cloud?
Michael Kennedy: The cloud is 10 years ago, 2008, I think.
Michael Kennedy: A little bit, a little bit, really caught going a little bit after that.
Michael Kennedy: But it's been a little while.
Michael Kennedy: Now we've got all this AI stuff going and we're proving, you know, unsolved airdosh mathematical problems and all sorts of things, you know, with AI and other, you know, trying to do protein folding and other things that are really computational, but also really different.
Michael Kennedy: And so I feel like this whole AI wave, especially the agentic AI, is going to roil what's happening at the universities all over again.
Shaun Chuah: I mean, if you look at the data center economics around AI, it's quite interesting, actually.
Shaun Chuah: Like a single rack from Nvidia is like a couple million dollars, right?
Shaun Chuah: It's crazy.
Shaun Chuah: And you need a power plant to plug it into.
Shaun Chuah: I can't see any university building their own AI data center in the future.
Shaun Chuah: So I think cloud adoption is inevitable in the sense that the economics of trying to
Shaun Chuah: use agentic AI doesn't make sense to try and build your own AI computer, unless you have
Shaun Chuah: specific governance requirements, which do apply to certain studies and certain aspects of work.
Shaun Chuah: But even then, you might contract a local AI company to do it and then share it between
Shaun Chuah: businesses and universities rather than having a university do it on its own.
Michael Kennedy: Yeah. People talk about the AI bubble. I don't know if there's actually an AI bubble. This stuff
Michael Kennedy: is so productive. The last bubble we had that was tech-related was the dot-com bubble. And there
Michael Kennedy: was really stupid stuff with a lot of money spent on it you know like there's always the pest.com or
Michael Kennedy: the weird investments you know thing and people are spending millions of dollars on ads to just
Michael Kennedy: like have dancing monkeys running it was a weird time and this is also a weird time but I feel like
Michael Kennedy: there's actually something legitimately at the core of it that is really changing the way people
Michael Kennedy: work and and do research and so on so I don't know it's going to bust if there is a bubble and I don't
Michael Kennedy: know if the bubble is going to burst. But if it does, I think that's also going to create an
Michael Kennedy: explosion of local AI. You know, all of a sudden, right now, if you have to pay $100 for your
Michael Kennedy: Anthropic subscription, that's totally reasonable. But if that becomes a $2,000 a month bill,
Michael Kennedy: well, then buying a $10,000 workstation that can do legit local AI is all of a sudden a bargain,
Michael Kennedy: you know what I mean? So it could be in the future that there's sort of a coming back to
Shaun Chuah: local compute as well for AI, maybe. Yeah, I mean, the small models are getting more and more capable
Shaun Chuah: as well. So not every workload needs a frontier model at the moment. So what you're saying is
Shaun Chuah: probably true in the sense that there is definitely going to be a role for local AI.
Michael Kennedy: I think Gemma maybe works this way, but certainly I can also see a world where there's kind of an
Michael Kennedy: orchestration layer and then 100 or 50 specialists that get selected, right? Right now, if you ask a
Michael Kennedy: frontier models to do something on genomics, it uses the same giant model as it would to use to
Michael Kennedy: like write Shakespeare derived things. Right. But if you had one that just is trained on genomics,
Michael Kennedy: you could have a much smaller model that could run locally and you could say, okay,
Michael Kennedy: this part of the question goes to this, this sub model. And I don't know, it's going to be
Michael Kennedy: interesting where it goes. And that let's, so coming back to it, let's, let's talk a little
Michael Kennedy: bit about Foundry. There's a little demo you've got going right here at the beginning. Let me see
Michael Kennedy: if I can go to the front of it. And maybe, I guess there's the stuff you talked about before,
Michael Kennedy: the sample gathering and organizing and all that kind of stuff, right? And then on the back of that,
Michael Kennedy: once you get it all done, there's this local tool using AI that understands all of your research
Michael Kennedy: data. So maybe tell us about the data collection and the non-AI bit, and then it'll be fun to talk
Michael Kennedy: about the AI because it's kind of non-standard. It's kind of powerful. Yeah, let's talk about the
Shaun Chuah: data bit because that has been one of the most difficult problems I've been thinking about for
Shaun Chuah: the last few years is how do we aggregate all these types of data sets into some kind of a common
Shaun Chuah: model that an AI... Well, nowadays we can use AI, but it still applies to humans. So when my
Shaun Chuah: colleagues are looking for data and trying to match, you know, data set A to B, what is the
Shaun Chuah: way we do it? And at the end of the day, I think, you know, we've brought down everything to a model
Shaun Chuah: where all data exists in files. So even tabular data, we keep it in CSV file. Well, historically,
Shaun Chuah: we've tried to put, you know, tabular data into the database. But I think going forward,
Shaun Chuah: we're just going to keep the files because that's the universal denominator. So whether you're
Shaun Chuah: dealing with endoscopy videos, MRI images, digital pathology slides. Everything's a file, and each
Shaun Chuah: file has each set of, you know, each type of data has its own file structure, but the common language
Shaun Chuah: at the end of day is files. So we put files, and the thing that makes the files useful is putting a
Shaun Chuah: layer of metadata and relationship data on top of the file. So I think by coupling the two of them,
Shaun Chuah: we found this common model that can generalize across all the data sets that we use.
Michael Kennedy: Very interesting. And, you know, to your point of just keep it in the files, you know, with things like DuckDB and other really cool things and Parquet files, you can kind of treat them like databases already. So I don't know if people know, but with DuckDB, you can say things like select star from read Parquet input, you know, which is pretty insane.
Shaun Chuah: Yeah, Parquet is great. We use it as well.
Michael Kennedy: Yeah. So also things like, what do you think about little SQLite files or DuckDB file where there's these just embedded no server databases?
Michael Kennedy: And I think there's probably some really good use cases and research for that.
Shaun Chuah: Potentially, you know, SQLite's a very interesting concept of having an entire database in a file.
Shaun Chuah: But when I think of my end users, my colleagues who are running science experiments and such,
Shaun Chuah: they're used to dealing with Excel and CSV files.
Shaun Chuah: So we try to keep the same file format everybody's familiar with.
Shaun Chuah: But I think for some of the future work that we're going to do, we can use some of these
Shaun Chuah: more specific file formats.
Shaun Chuah: Because as you know, if everything's a file, then an AI agent can run across all the files
Shaun Chuah: and pull out the data that it needs for what it needs to do.
Michael Kennedy: Yeah, absolutely.
Michael Kennedy: Yeah, sure.
Michael Kennedy: If you're giving them the files directly, here's either your Excel workbook or here's your CSV file.
Michael Kennedy: But if it's coming in and out of a platform like Foundry 120, you can store it as one thing and then export it or import it as another, right?
Shaun Chuah: Yeah. I mean, so fundamentally, what we do is that the files sit in Azure Blob Storage.
Shaun Chuah: And when Helix, our AI agent, wants to process a file, it spins up a VM.
Shaun Chuah: The file gets transferred from the Azure storage into the VM.
Shaun Chuah: The AI sends its analysis code, whether it's in Python or any other language, into the VM.
Shaun Chuah: The computation happens, and then we return the output to Helix and store the output back in Azure storage.
Shaun Chuah: So by doing that, we put the sandbox guardrail around the AI agent for security purposes.
Shaun Chuah: but it also allows us to enable the AI to do processing,
Shaun Chuah: generate new files, store it.
Shaun Chuah: And I think that's the kind of model that works for us in Foundry
Shaun Chuah: while keeping it all within an institutional Azure environment
Shaun Chuah: and also allows us to enforce all the role-based access controls
Shaun Chuah: that we need for our team members.
Shaun Chuah: So when they query the AI, the AI can only see the same files
Shaun Chuah: that they would have normal access to.
Shaun Chuah: And I think that's the design that's very specific for this
Shaun Chuah: because of the governance requirements that we have around the data sets that we use.
Michael Kennedy: These AIs are sneaky.
Michael Kennedy: They will find a way to access the files.
Michael Kennedy: I mean, the really big headline cases are like,
Michael Kennedy: OpenAI was training its model and it hacked multiple systems
Michael Kennedy: so that it could get to the answers on Hugging Face
Michael Kennedy: instead of just figuring out the, solving the test, right?
Michael Kennedy: It's like a teenager that doesn't really care about the work is just doing it.
Michael Kennedy: But what I was thinking was, you know, I was working with Claude
Michael Kennedy: and I had some question about my code
Michael Kennedy: and it said something to the effect of like,
Michael Kennedy: oh yeah, you have two GitHub issues on this.
Michael Kennedy: I never gave it direct access to GitHub.
Michael Kennedy: I never gave it access to GitHub.
Michael Kennedy: I'm like, how does it know that?
Michael Kennedy: It's quoting like GitHub stuff,
Michael Kennedy: not through Git history locally,
Michael Kennedy: but it like reading the issues and the PRs.
Michael Kennedy: I'm like, how does it do?
Michael Kennedy: And then I realized I had the GitHub CLI installed
Michael Kennedy: and it's like, well,
Michael Kennedy: let me see if the GitHub CLI is installed.
Michael Kennedy: Oh, and look, it's already automatically authenticated
Michael Kennedy: because Michael logged in at some point
Michael Kennedy: to the CLI. And so it was just using the CLI that it's also, you know, like, oh, let me check that
Michael Kennedy: on the server for you. I'm like, excuse me. Yeah. Yeah. On your production server, you're doing this.
Michael Kennedy: How you're not supposed to be there. Why? And you know, it's just like, it's realized in the code
Michael Kennedy: somehow it's figured out that it can SSH. So you got to be really careful about those things. Right.
Michael Kennedy: Cause they're not malicious. They're just like, you asked me to solve a problem. And if I can get
Michael Kennedy: to that, I got a better answer, more concrete data. And, but it could also go and we fixed the problem
Michael Kennedy: by resetting the database.
Michael Kennedy: Like, oh, no, you didn't.
Shaun Chuah: Yeah, so for us...
Michael Kennedy: So how do you do that kind of stuff in your project?
Shaun Chuah: So it's the backend.
Shaun Chuah: So Django enforces the permissions.
Shaun Chuah: And actually, so when the AI stages data and stages code,
Shaun Chuah: that actually goes through Django first.
Shaun Chuah: So the AI is not calling directly into the files,
Shaun Chuah: is not calling directly into a compute environment.
Shaun Chuah: And then Django screens all that code
Shaun Chuah: and activates the VM.
Shaun Chuah: So we've actually put Django in as a security guard
Shaun Chuah: between your AI and the raw data and the compute environments
Michael Kennedy: that we run in.
Michael Kennedy: MARK MANDEL: Oh, very cool.
Michael Kennedy: So Foundry 120 is also written on Django,
Michael Kennedy: but it's more Django REST framework and TypeScript React.
Michael Kennedy: Is that the story?
Shaun Chuah: FRANCESC CAMPOY: Yep, that's right.
Shaun Chuah: So on the front end, it's-
Shaun Chuah: MARK MANDEL: Yeah, so tell us a bit about it.
Shaun Chuah: FRANCESC CAMPOY: So the old app that we used to run off
Shaun Chuah: was just pure Django.
Shaun Chuah: So we use Django templates to handle all the registration and the CRUD workflows.
Shaun Chuah: But as we move into this age of AI, AI, as you know, is pretty asynchronous.
Shaun Chuah: So every call you make takes, you know, sometimes it feels like forever to come back with a response.
Shaun Chuah: And when we think about the async nature of all the calls that have to be made to run an AI conversation or agent loop,
Shaun Chuah: TypeScript and JavaScript tends to come to be more suitable for that kind of application.
Shaun Chuah: So we run both.
Shaun Chuah: So we have TypeScript on the front end, Django on the back end.
Shaun Chuah: I think it's a great setup.
Shaun Chuah: It gives us access to the entire Python data science ecosystem, while also giving us all
Shaun Chuah: the TypeScript and JavaScript ecosystem for handling all these asynchronous work and the
Shaun Chuah: interactivity that we want on the front end when you start running AI applications.
Michael Kennedy: Makes sense.
Michael Kennedy: Now, what I'm about to ask you doesn't really make sense because of the AI angle and that
Michael Kennedy: kind of stuff.
Michael Kennedy: But if you think about scaling this out to other research projects and other groups, have you considered looking at things like PyOxid, Iodide, sorry, and things like JupyterLite for running some of that compute on the front end on people's browsers so that you don't have to basically pay the compute cost?
Shaun Chuah: So that's an interesting question because now you're asking me about the compute architecture that we have in the backend, which is actually pretty heavy.
Shaun Chuah: So we've mentioned that some of the files that we have might be gigabytes in size and the compute power you need to run genomics pipeline is pretty high.
Shaun Chuah: So for a concrete example, so in the backend of our Foundry system, we have access to about 350 CPUs on Azure.
Shaun Chuah: So if you ask Helix for a very heavy analysis, say on a big transcriptomic data set of something, through Django, we are able to orchestrate up a heavy compute job, which will then go off and run.
Shaun Chuah: It'll spin up as many CPUs as it needs to, to process the job, and then returns the output later on once it's all done.
Shaun Chuah: And that process can take half an hour, a couple of hours.
Shaun Chuah: So it might come back really late.
Shaun Chuah: And because of that model that we're running, actually, the kind of computational requirements we have is pretty high.
Shaun Chuah: And so we don't really want to run compute on people's laptops.
Shaun Chuah: We want to run it in the cloud to handle the data sets that we're dealing with.
Shaun Chuah: So that's a very specific design choice.
Shaun Chuah: And it's all to do with the kind of data that we're handling and the need to throw a lot of RAM and a lot of CPU at it.
Michael Kennedy: Sure. And if your individual files are five gigs, that's a lot of just bandwidth costs.
Michael Kennedy: So it's like every time you want to load something, you got to pull that five gigs out of the cloud, which has different costs and so on.
Shaun Chuah: Right. Well, yeah. And many of the biological data problems are parallel.
Shaun Chuah: Right. So you've got 200 participants each of five gigs.
Shaun Chuah: You might as well spin up 200 machines and process all of them in parallel.
Shaun Chuah: So all these problems that we have are very paralyzable.
Shaun Chuah: And the cloud is a great platform to do that in because you can do it on demand, on the fly, spin it up, finish processing and tear it all down.
Shaun Chuah: So minimal cost for, you know, maximum impact.
Shaun Chuah: That's what we're going for in the back end.
Michael Kennedy: Right. That's the bursting component that you talked about.
Michael Kennedy: I do think JupyterLite is pretty interesting with the local Piodide execution and all that kind of stuff.
Michael Kennedy: Just the fact that that's possible is it's pretty neat.
Michael Kennedy: But yeah, I can see that it really doesn't apply for what you're doing here.
Shaun Chuah: Well, I haven't talked to you about the front end of sample operations, right?
Shaun Chuah: Because we're running a sample collection in the hospitals across Scotland.
Shaun Chuah: And I must say the frontline IT infrastructure is not always the best.
Shaun Chuah: So by having all our compute power on the server side, we can guarantee a speedy experience for our teams working at the front end.
Shaun Chuah: So we're not depending on the front end's computational power.
Michael Kennedy: I'll tell you what, my experience looking over the shoulder at the software that doctors and nurses use,
Michael Kennedy: there's a lot of room for improving the user experience.
Shaun Chuah: Oh, definitely.
Shaun Chuah: I mean, part of the reason we went Django as well is because it was server-side.
Shaun Chuah: And, you know, on the front end, you know, we have some computers I've used in hospitals.
Shaun Chuah: They go back to 2010, right?
Shaun Chuah: You know, we're running on Intel chips like 20 years old.
Michael Kennedy: Oh, my goodness.
Michael Kennedy: Yep. And there's a lot of Cisco, remote, whatever there. So let's talk about the AI side now. So we talked about the data, the data handling, some of the tech behind Foundry 120. But I think one of the cornerstones is this Helix AI. Now, when people think there's a bit of a problem here, Sean, like people talk about AI, and there's two or three different things it could be, and they all use the same word.
Michael Kennedy: And they think they're talking about the same thing, but they're actually talking past each other.
Michael Kennedy: You know, like I asked ChatGPT for this math problem and it got it wrong.
Michael Kennedy: It's like, yeah, but we also built incredible software with this other thing that we also call AI.
Michael Kennedy: And, you know, it's always right because it writes Python to actually answer its questions.
Michael Kennedy: And yeah, it's just really interesting.
Michael Kennedy: So there's an AI that you've mentioned a couple of times in here that will help researchers ask questions, find data, look for trends and those kinds of things.
Michael Kennedy: And this, I think, you give me your thoughts on this, but my feeling is that it's a little bit like a Claude code or a codex.
Michael Kennedy: One of these sort of tool using self-correcting AIs, not just a chat LL.
Shaun Chuah: Yeah. So Helix is an agentic AI system. And I think the problem that you're describing is
Shaun Chuah: because most people's experience of AI is chatbots. You go to chatgpt.com, you ask a question,
Shaun Chuah: it gives you an answer. But actually the stuff that we're seeing that makes us think that AI
Shaun Chuah: might not be a bubble is all this agentic AI stuff that we're seeing. So Claude Code, codecs,
Shaun Chuah: agentic AI is a very different paradigm from chatbots, right? In agentic AI, the AI,
Shaun Chuah: you give the AI a task, it looks at its tool set, it looks at what you're trying to do,
Shaun Chuah: and then it goes away and works at it until it gives you an answer. And that's incredibly powerful.
Shaun Chuah: Whereas I think, you know, 95% of people's experience of AI is almost like a Google search.
Shaun Chuah: You go to ChatGPT and you ask, hey, what's the directions to this place or what's the recipe for
Shaun Chuah: that? And therefore, there's this huge gap in understanding of how powerful agentic AI systems
Shaun Chuah: can be. So Helix is really one of the, we think it's one of the first demonstrations of how you
Shaun Chuah: would apply agentic AI in the science world. And a lot of the scientists that I'm showing this
Shaun Chuah: system to, this is the first time that they're seeing an agentic AI system. So, you know.
Shaun Chuah: What's their reaction?
Shaun Chuah: I think everybody's quite excited. They're like, oh, that used to take me like months to do,
Shaun Chuah: or it took me a lot of emails to do.
Shaun Chuah: Just doing it in minutes right now,
Shaun Chuah: it's quite amazing.
Shaun Chuah: And historically, every team member
Shaun Chuah: that's joined our team,
Shaun Chuah: I've had to sit down with them
Shaun Chuah: and teach them how to use Python or R
Shaun Chuah: to get a graph out of Excel file or something.
Shaun Chuah: And now you can just hand it off to Helix,
Shaun Chuah: let it do it, let it write the code.
Shaun Chuah: And then what you do in this situation
Shaun Chuah: is that you've got to verify that it's correct.
Shaun Chuah: So the work changes.
Shaun Chuah: So instead of you as a researcher
Shaun Chuah: writing the analysis code,
Shaun Chuah: You get the AI to do the analysis for you.
Shaun Chuah: And then what you have to do is verify that it is correct.
Shaun Chuah: So it's a very different way of working.
Shaun Chuah: But it's incredibly powerful.
Shaun Chuah: It's much faster.
Shaun Chuah: It's taken a lot of road work out of everybody's life.
Shaun Chuah: So I think everybody's really excited about it.
Michael Kennedy: I would imagine.
Michael Kennedy: I'm going to have you talk us through just this sort of workflow that it goes through
Michael Kennedy: real quick.
Michael Kennedy: But that's the big danger is that it just hallucinates, which I don't know, that's a
Michael Kennedy: weird word.
Michael Kennedy: It's just it's wrong, whatever, about the actual data.
Michael Kennedy: Do you all use RAG, the sort of training on the data,
Michael Kennedy: or is it just really the tool-using components that make it go?
Shaun Chuah: It depends on what you mean by RAG,
Shaun Chuah: because we use tools to ground the AI.
Michael Kennedy: Yeah, I'm thinking like going and actually retraining the model
Michael Kennedy: on the research files and data,
Michael Kennedy: which I'm guessing from looking at it,
Michael Kennedy: it doesn't look like it.
Michael Kennedy: It looks more of a Claude Code tool-using style.
Shaun Chuah: Yeah, it is more Claude Code style.
Shaun Chuah: we don't train the AI specifically for it.
Shaun Chuah: We can swap the base models as newer versions come up.
Shaun Chuah: Because if supervised fine-tuning or doing some RL on a base,
Shaun Chuah: LLM will cost you a lot of money.
Michael Kennedy: And it's not generalizable, right?
Shaun Chuah: Yeah, and you need the data to train it on.
Shaun Chuah: And that's not easy to make as well.
Shaun Chuah: So yeah, so given the rapid progress,
Shaun Chuah: we want a model where we can just update to the latest model
Shaun Chuah: and just leverage the latest changes
Shaun Chuah: that the big labs are coming out with.
Michael Kennedy: Amazing.
Michael Kennedy: I think that's the right way.
Michael Kennedy: So if you go to foundry120.com,
Michael Kennedy: there's a one-minute little screencast,
Michael Kennedy: silent screencast of it going.
Michael Kennedy: So I'm going to, Sean, I'm going to hit play
Michael Kennedy: and you kind of just narrate what's happening.
Michael Kennedy: I think that'll give people an interesting sense
Michael Kennedy: of what this thing is about
Michael Kennedy: and give us some talking points here.
Shaun Chuah: So we asked Helix, you know, what plasma samples do we have for the music study?
Shaun Chuah: And can you break them down by disease groups?
Shaun Chuah: So to get to that answer, you need to join the clinical data frame with your sample database.
Shaun Chuah: And then you got to work out which samples are unused, you know, what sample type it is.
Shaun Chuah: And then for the disease groups, it's got to inspect the clinical data frame and figure
Shaun Chuah: out how many disease groups do you have in your disease column.
Shaun Chuah: And then you've got to do the join and the grouping.
Shaun Chuah: So in this demo, it's gone ahead and done it.
Shaun Chuah: And it will come back and tell you, well, within our database, we've got like 4,000 samples belonging for Crohn's disease patients and 2,000 with ulcerative colitis.
Michael Kennedy: Yeah.
Michael Kennedy: And since people are just listening, let me just go back, just narrate really quick, like fill in a little background visuals.
Michael Kennedy: You can see it.
Michael Kennedy: It'll, using the different tools, it'll be like, get sample and it'll run for a second.
Michael Kennedy: Then it'll write some Python code to do a thing.
Michael Kennedy: And then it'll do some more data access and then some more code.
Michael Kennedy: So it's primarily orchestrating a bunch of the tools and the code writing that it already knows, right?
Michael Kennedy: It's not just reading 100 terabytes of data or whatever.
Shaun Chuah: No, you can't read all that data because the context window of your AI is limited.
Shaun Chuah: So you can't just dump all the raw Excel file into the AI and say,
Shaun Chuah: five video samples.
Michael Kennedy: Yeah, exactly.
Michael Kennedy: I mean, even the really big ones have a million context right now.
Michael Kennedy: All right, carrying on.
Michael Kennedy: So then it's off to get a picture, right?
Shaun Chuah: So the next question, we've asked it to do some graphing.
Shaun Chuah: So we've asked to plot CRP, which is a blood test against cell-free DNA,
Shaun Chuah: which is a scientific experimental output.
Shaun Chuah: So to do this, it's got to go and find your clinical data frame
Shaun Chuah: and join it with your science data.
Shaun Chuah: And it comes up, writes some matplotlib code
Shaun Chuah: and gives you a graph back and tell you what it found.
Shaun Chuah: So that's what it does.
Shaun Chuah: In this second segment, the AI runs into an error
Shaun Chuah: and it recovers from the error.
Shaun Chuah: So the AI is able to read the output of the tool, correct, it's working and come back to you.
Shaun Chuah: So that's just a demonstration of how an agentic AI system looks like.
Michael Kennedy: Yeah, good narration.
Michael Kennedy: And people can go and play that for themselves.
Michael Kennedy: But I think that's the big difference between what you're saying, just the chatbot as kind of a better Google, right?
Michael Kennedy: It's not that much of the AI thinking.
Michael Kennedy: It's a whole bunch of the AI using the tools.
Michael Kennedy: And the tools are deterministic, right?
Shaun Chuah: The tools are deterministic.
Shaun Chuah: And actually designing the tools is one of the most challenging things to do is like,
Shaun Chuah: how many tools do you expose?
Shaun Chuah: What should each tool do?
Shaun Chuah: And what's a logical set of tools?
Shaun Chuah: And how do you make sure that the AI picks them correctly?
Shaun Chuah: So I think tool design itself is a huge topic of how you do it.
Shaun Chuah: But because the tools run on the backend, we can then enforce the RBAC controls on the
Shaun Chuah: tools itself.
Shaun Chuah: So you can guarantee that your data access is, you know, security around it is solid.
Michael Kennedy: Have you thought about adding an MCP server to it?
Michael Kennedy: So then people can just within their own AI or whatever,
Michael Kennedy: just, hey, what does Foundry say about this?
Shaun Chuah: Yeah, MCP is interesting.
Shaun Chuah: But I think one of the limiting things for us using MCP
Shaun Chuah: is the governance around it,
Shaun Chuah: in the sense that we are not allowed to just put data
Shaun Chuah: into a Claude Code and send it across to Anthropic.
Shaun Chuah: Whereas within this system,
Shaun Chuah: all inference happens in Microsoft Azure
Shaun Chuah: and it's GDPR compliant,
Shaun Chuah: which in the UK is important for us from a research perspective.
Michael Kennedy: So in this...
Michael Kennedy: It's also important.
Michael Kennedy: It applies to the US companies as well,
Michael Kennedy: if they have European customers.
Shaun Chuah: Yeah, so because of regulatory compliance things,
Shaun Chuah: we need to make sure that we know where the inference is running
Shaun Chuah: and we can guarantee that inference all runs within us,
Shaun Chuah: you know, because we have got the platform controls of Azure,
Shaun Chuah: we can guarantee where everything happens.
Shaun Chuah: And that allows us to actually let the AI safely operate on our data.
Michael Kennedy: I see.
Michael Kennedy: So maybe you're using a data center in Ireland for your data so it doesn't leave the UK or
Michael Kennedy: something like that.
Shaun Chuah: Yeah, we run most of the things in the UK South data center.
Shaun Chuah: For EU compliance, we run it in the Sweden data center.
Shaun Chuah: So that's where everything happens at the moment.
Michael Kennedy: Yeah, that makes a lot of sense.
Michael Kennedy: Let's zoom out a little bit.
Michael Kennedy: You've been working on this project for six plus years now.
Michael Kennedy: You've taken it from working with books to write the Django app to integrating to the
Michael Kennedy: cloud, Microsoft Foundry, and Azure, and all this tool using AI. What do you see for research,
Michael Kennedy: either happening now or in the next couple of years with all this kind of stuff coming along?
Shaun Chuah: Yeah, I mean, I think, you know, we're all very excited about the potential of agentic AI to
Shaun Chuah: accelerate a lot of the research workflows that we see. And, you know, hopefully, you know, we get
Shaun Chuah: to discoveries faster because drug discovery is a very long process. And I think agentic AI has
Shaun Chuah: absolutely a role to play in shortening some of these bottlenecks that we face. So I think it'd
Shaun Chuah: be very exciting to see. I think agentic AI is going to transform how we do science, how we operate
Shaun Chuah: also in the clinical world. So I see a lot of potential, but the real world is going to take
Shaun Chuah: a while to catch up to where the capabilities are today. So I think most people on this podcast
Shaun Chuah: would have used coding agents, but I can tell you that almost everybody else in the population has
Shaun Chuah: never touched a coding agent. So the gap between what agentic AI systems can do and what everybody's
Shaun Chuah: understanding of AI is still very wide. And there's still a lot more work to do to teach people how to
Shaun Chuah: use the systems, what they're capable of, where the limitations are, and how do you apply it to your
Michael Kennedy: work. Do you think it can be reliable? Like, do you think we can trust the results and answers
Michael Kennedy: we're getting from things like Helix and other tools that are working on us? Well, hopefully,
Shaun Chuah: as things improve over the coming years, the reliability will go up. I mean, personally,
Shaun Chuah: you know, the coding agents are still not 100% reliable. You know, even like the best models,
Shaun Chuah: like Opus and Fable, they still can make mistakes. So we're not quite past the reliability threshold
Shaun Chuah: yet. So we do have to be aware. And I think understanding what you're trying to do is
Shaun Chuah: actually very important today compared to, say, five years ago, because you have to really
Shaun Chuah: understand what you're trying to do to be able to supervise an AI to do what you were going to do.
Michael Kennedy: I totally agree with what you said. But the alternative is to have a human do it.
Michael Kennedy: And humans are also not 100% reliable. There's recently been this dust up with the Linus Torvalds
Michael Kennedy: over about using, I forgot the name. There was some AI that they're using as a pre-screen for PRs
Michael Kennedy: for the Linux kernel. And some people were like, we're not using it. And it's like, look, this thing
Michael Kennedy: is at least as good as the people often doing it. And it's an accelerator. And there's that tension
Michael Kennedy: of people expect, I think because it's a computer, people expect it to be perfect, right? Because
Michael Kennedy: software is typically deterministic. So if it works once, it's always going to work. And AI isn't like
Shaun Chuah: that, but people also aren't like that. Yeah, that's right. I mean, like, you know,
Shaun Chuah: certainly everybody, you know, having an AI by your side is like having a colleague on your team,
Shaun Chuah: except this colleague can write code like tremendously faster and much better than most
Shaun Chuah: people. You know, today I would say that Claude Code and codex can write code way faster and way
Shaun Chuah: better than me, but you still need that kind of strategic view from the human to just make sure
Shaun Chuah: that you're going on the right path
Shaun Chuah: because you got to drive the AI
Shaun Chuah: and you've got to direct it.
Shaun Chuah: And it's the same with the scientific work.
Shaun Chuah: So I tell my scientific colleagues,
Shaun Chuah: you need to make sure that the answers
Shaun Chuah: that come back pass the smell test.
Shaun Chuah: You need to make sure that,
Shaun Chuah: you know, the numbers that you're seeing
Shaun Chuah: are in line with your expectations.
Shaun Chuah: You're expecting a number
Shaun Chuah: in this magnitude range
Shaun Chuah: and you get it there
Shaun Chuah: because sometimes the AI goes off
Shaun Chuah: and does funny things, right?
Michael Kennedy: Yeah, I just, you know,
Michael Kennedy: if you ask it to verify everything
Michael Kennedy: and prove it and write code to back it up,
Michael Kennedy: like it's better than if you just ask it
Michael Kennedy: You know what I mean?
Michael Kennedy: Like there's techniques,
Michael Kennedy: but you do have to treat it
Michael Kennedy: with a little bit of skepticism.
Michael Kennedy: But that's also true for your colleagues
Michael Kennedy: and your grad students and whatever, right?
Michael Kennedy: Like no professor would just take a,
Michael Kennedy: like, hey, grad student, write the paper.
Michael Kennedy: And they don't even read it.
Michael Kennedy: They just publish,
Michael Kennedy: they just send it off to nature or medicine
Michael Kennedy: or write the medical journal or whatever.
Shaun Chuah: I mean, it depends.
Shaun Chuah: I think for disposable stuff,
Shaun Chuah: you can let the AI do more of that.
Shaun Chuah: But for the real critical workflows,
Shaun Chuah: you want to make sure every single step is correct.
Michael Kennedy: Yeah.
Michael Kennedy: All right.
Michael Kennedy: Well, that brings us to our final call to action.
Michael Kennedy: If scientific researchers or medical researchers are out there listening,
Michael Kennedy: either what can they learn from your experience
Michael Kennedy: or if they wanted to work with you on some of this, what would you say?
Shaun Chuah: So one of the big questions and why we're putting Foundry out there
Shaun Chuah: is we don't know how generalizable it is
Shaun Chuah: or whether it's just going to be hyper-personal software for ourselves, our team.
Shaun Chuah: But I think the general principles, I've shared them widely.
Shaun Chuah: So please feel free to just take the idea and run with it.
Shaun Chuah: I'm very excited to see what other people can do with the ideas.
Shaun Chuah: And perhaps within their own institutions, they might want to build their own systems.
Shaun Chuah: And I think that's absolutely valid.
Shaun Chuah: But if you do want to explore a partnership with us, come and visit us on foundry120.com
Shaun Chuah: and drop me an email.
Michael Kennedy: Yeah, great.
Michael Kennedy: And I'll link to your web page.
Michael Kennedy: You've got email and your GitHub and other ways to get in touch with you there.
Michael Kennedy: You also have a lot of interesting writing here, so people can check that out.
Shaun Chuah: Yeah, that was my journey into coding, really.
Michael Kennedy: Yeah, we all have one of those journeys to tell the story of.
Michael Kennedy: Well, Sean, thank you so much for being on the show.
Michael Kennedy: Keep up the good work.
Michael Kennedy: I think this is a super interesting project.
Shaun Chuah: Thanks very much, Michael.
Shaun Chuah: Very happy to be here, and thanks for the invitation.
Michael Kennedy: Yeah, you bet. Bye.
Michael Kennedy: Bye.
Michael Kennedy: This has been another episode of Talk Python To Me.
Michael Kennedy: Thank you to our sponsors.
Michael Kennedy: Be sure to check out what they're offering.
Michael Kennedy: It really helps support the show.
Michael Kennedy: This episode is brought to you by Sentry.
Michael Kennedy: You know Sentry for the air monitoring, but they now have logs too.
Michael Kennedy: And with Sentry, your logs become way more usable.
Michael Kennedy: interleaving into your error reports to enhance debugging and understanding.
Michael Kennedy: Get started today at talkpython.fm/sentry.
Michael Kennedy: And it's also brought to you by Talk Python Courses.
Michael Kennedy: Course completion certificates are now live.
Michael Kennedy: If you finished a course, there's a certificate waiting for you on your account page right now.
Michael Kennedy: Download it as a PDF or add it to your LinkedIn profile with one click
Michael Kennedy: under licenses and certifications.
Michael Kennedy: Same section as your formal degrees.
Michael Kennedy: Visit training.Talk Python.fm slash account to see what you've already earned.
Michael Kennedy: And if you're not already subscribed to the show on your favorite podcast player,
Michael Kennedy: what are you waiting for?
Michael Kennedy: Just search for Python in your podcast player.
Michael Kennedy: We should be right at the top.
Michael Kennedy: If you enjoyed that geeky rap song, you can download the full track.
Michael Kennedy: The link is actually in your podcast blur show notes.
Michael Kennedy: This is your host, Michael Kennedy.
Michael Kennedy: Thank you so much for listening.
Michael Kennedy: I really appreciate it.
Michael Kennedy: I'll see you next time.
Music: I'm out.