Machine learning has made huge advancements in the past couple of years.
We now have ML models helping doctors catch disease early.
Google is using machine learning to suggest routes in their Maps app that will lessen the amount of gasoline used in a trip, and many more examples.
But there's also a heavy cost for training these machine learning models.
In this episode, you'll meet Victor Schmidt, Jonathan Wilson, and Boris Feld.
They work on the Code Carbon project together.
This project offers a Python package and dashboarding tool that will help you understand and minimize your ML model's environmental impact.
This is Talk Python to Me, episode 318, recorded May 19th, 2021.
Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.
This is your host, Michael Kennedy.
Follow me on Twitter where I'm @mkennedy.
And keep up with the show and listen to past episodes at talkpython.fm.
And follow the show on Twitter via at Talk Python.
This episode is brought to you by Square and us over at Talk Python Training.
Please check out what we're offering during our segments.
It really helps support the show.
When you need to learn something new, whether it's foundational Python, advanced topics like async, or web apps and web APIs,
be sure to check out our over 200 hours of courses at Talk Python.
And if your company's considering how they'll get up to speed on Python, please recommend they give our content a look.
Thanks.
Boris, Victor, Jonathan, welcome to Talk Python to Me.
Thanks for having us.
Glad to be here.
It's great to be here with you.
Welcome, everyone.
You all are doing really important work, and I'm super excited to talk to you about it.
So we're going to talk about machine learning, how much carbon is being used for training machine learning models, and things like that.
And some cool tools you built over at CodeCarbon.io and that collaboration you got going on there.
But before we get into all those sides of the stories, let's just start with yours.
Jonathan, you want to go first?
How did you get into Python?
Sure.
Yeah, thanks for having us, Michael.
My name is John Wilson.
I'm an associate professor of environmental studies at Haverford College.
I'm actually an environmental scientist.
So I was brought in to kind of consult from the environmental side of this project.
But I have a secret history as a computer science undergraduate back in the dark ages, learning to code on C, C++, and Java.
And yeah, so I was brought in to kind of like provide that environmental perspective on the project.
And, you know, having a little bit of a coding background, you know, despite how rusty it is, has been pretty helpful at thinking some of these connections through between computational issues and environmental issues.
Yeah, I can imagine.
Did you find Python to be pretty welcoming, given like a C background and stuff?
Oh, gosh, yeah.
I mean, you know, I learned back in the bad old days of, not bad old days, I shouldn't say that, scheme, things like that, you know, a little bit more challenging, you know, where it derives.
Yeah, that's one of the first languages I had to learn for like a few CS classes I took.
I was like, we're going to start with scheme, like anything with this.
Give me something mainstream, please.
Yeah, sometimes I feel like, you know, the sort of like older person, you know, telling the kids these days about how, you know, we had to walk uphill both ways in the snow to learn programming.
And it's much, much easier.
And it's one of the things I like about Python is it's really accessible to people from different fields.
You know, you get into it from aspects of natural sciences, but even people who are like in the digital humanities are using it to, you know, for language processing and things like that.
It's super flexible, which is really neat.
Yeah, it's really impressive what people in those different fields are doing, how they can bring that in.
Boris, how about yourself?
How did you get into Python?
I actually discovered Python during my master's degree.
And I got a math teacher that introduced us to Python because they use Python for his own thesis.
And I had one stuff to do, which was implementing RSA encryption.
And I didn't want to do it because math was not my forte.
So instead, I did some encryption inside images in Python.
And I fell in love with Python.
Oh, fantastic.
Victor?
I discovered this taking a data science class in, when was that?
2014, I think it was.
That's really, I really entered Python through the data science perspective.
And then I took a course in general web development.
And we used Django.
Oh, right.
Nice.
And so it's been, yeah, so it's been really like the main language I've been using.
I was taught CS with Java and so on.
So I was never a computer science fan.
Like, I liked math.
And I found Python to be really flexible in that regard.
Like, you can do math super easily without, like, getting lost in translation.
Yeah.
One of the things that just came out is one of the new Texas instruments, the TI-84 calculator.
They have a, you can now program it with Python.
So that's kind of interesting now that it's one of the old calculators that everyone's probably used going through math and whatnot.
Is now sort of, you know, more in the modern space.
I think my first program was on my TI because I was bored in math course.
And I cannot follow.
So instead, I wrote some programs.
Yeah.
That's not a terrible way to spend your time.
All right.
So let's go ahead and talk about the main, you know, get to the main subject here.
So let's start by just setting the stage.
There's an interesting article here that came out.
This is not even that new.
It's, you know, 2019.
And it's in the MIT Technology Review.
So, you know, that gives it probably a little more than just some random blog says this.
And it's got a picture, a big picture of a data center.
And the title of the article by Karen Ho is,
Training a Single AI Model Can Emit As Much Carbon As Five Cars Throughout Their Lifetime.
So that sounds pretty horrible.
But we also know that machine learning has a lot of value to society,
a lot of important things that it can do.
So here's where we are.
And this seems like a good place to start the conversation for what you all are doing.
I have a mixed feeling about this article.
I think one of the great things it did is raise a lot of attention and awareness about this topic.
I think a lot of approximations were made.
And the goal here is not to criticize authors,
but rather to say that in the meantime,
things have evolved and our understanding has, I think, been a little more precise.
Well, maybe because people are building tools that measure it instead of estimate.
So there's that, definitely.
And we hope that helps.
But it's also one of the things you need to put in perspective is that the kind of model they're looking at is not necessarily your everyday model.
Someone can just train on their local computer or even in academia.
It's hard to get your hands on such large clusters and the number of GPUs used and so on.
So like, I just want to put that in perspective that even if those numbers were accurate,
and they are not, but I mean, it's a ballpark.
It's not like every data scientist you'll meet and every AI researcher you'll meet is going to have something in that level of complexity that they train every day.
Right.
So I have over here a sim racing setup for some sim racing I do,
and it has a GeForce 2070 in it.
It would have to run a very long time to emit this much carbon, right?
Like, you got to have the necessary money and compute resources to, you know, even get there, right?
Yeah.
Like the number, I don't remember exactly the setup that they're looking at in this paper,
but like typically the modern language models that you hear about, like, oh,
OpenAI has a new NLP model and like GPG-3, and it's that number of billion of parameters.
Like, they train those things on hundreds and hundreds of machines for a very long time.
This is not something you can do easily.
It costs millions of dollars in investment upfront, and then just using those things is super expensive.
So while I think we should be careful, it's not like the whole field is like that.
Yeah, that's a very good point.
I recall there was some cancer research that needed to answer some big problem,
and there was an article where they spun up something like 6,000 virtual machines across AWS clusters for an hour
and had it go crazy to answer, you know, some protein folding question or something like that.
That would use a lot of energy, but it's extremely, extremely rare as well.
On the other hand, you know, if you created that model and it solved cancer, well, you know,
people drive cars all the time for less valuable reasons than, you know, curing cancer.
Yeah, and I think just to build on what Victor said, you know, I think there was something really valuable about this article coming out.
You know, I think for a long time, there's been attention that's been paid to the sort of environmental toll of supply chains in computing.
You know, people have talked a lot about where minerals come from.
Yeah, and one of the things that was really interesting about this article was, you know, with the approximations,
it caught people thinking about the question that kind of animates our collaboration,
which is when you're doing any kind of energy-intensive computational issue,
you might want to think about where your electrons come from.
You know, what's actually powering the hardware that you're using to do this?
And I think this article did a really nice job of, like, focusing attention that there are some really energy-intensive projects
that in particular ways, particularly if they're located in particular locations,
they can have a really large environmental cost that isn't really transparent to the user or the person training the model.
Yeah, yeah.
Well, I don't want to go down this road just yet.
I want to keep talking about the more high-level a little bit.
But, you know, if the people who did this very expensive model,
if they just said, I'm going to pick the closest AWS data center to me,
that rather than, let me find the data center by just flipping a switch and say,
no, no, maybe the one up in Prinnville, Oregon, by the dam,
would be better than the one by the coal factory, for example, right?
Like, that's something they could easily do, and it maybe doesn't change anything for them, right?
Yeah, it's not always the case, because when you have, for example, health data and so on,
there are legislations, but definitely, like, if you can,
and there's more than just the money at stake here,
and it's probably going to be a marginal change,
because the prices tend to be not equal, but kind of uniform still.
I think it's another decision item.
Yeah.
Boris, you got any thoughts on this article before we move on?
Yeah, I think it came with a good, to highlight a serious issue,
and if people want to improve it, as most of my manager told me,
if you want to improve it, you must measure it before.
So we are there to give us a start of an answer to, and give them action how to improve the cut carbon emission on training models.
Hopefully to not train less models, but train better models.
Yeah.
I think, for example, this is part of what the recent Google paper, led by David Patterson,
on training neural networks and their environmental impact.
This is one of the things they say, and it's quite a dense paper,
and a lot of metrics and so on.
But one of the things they say is,
if you don't want people caricaturing your numbers and putting approximations out there,
well, you'd better publish those numbers yourself, right?
And you need tools to do that.
So if you're Google or if you're close to the infrastructure that you use, it's easier.
It's even better if you have access to the plugs.
But that's not the case of everyone, right?
Right.
So you're saying if you could put something to actually measure the electricity going through the wire,
instead of some approximation, you're in a better place to know the answer.
Yeah, definitely.
That's where I think we might be a little ahead of your schedule,
but we might go there still.
Which is like, that's where Code Carbon comes into play, right?
This is why we want to create this tool.
This is a user-facing product, right?
And I think it's very important to highlight that.
It is not intended to be the solution for a data center.
This is not something that we think should be deployed as a cloud provider,
or if you own your own infrastructure,
if you want to have centralized numbers, there are alternatives out there.
Yeah.
Things like scapandre.
I don't know how you say that.
It's a French word.
Anyway, it's out there on GitHub.
You can find it by just looking this way.
But the goal here is, as a user, what can you do if you don't have those numbers?
Do you do nothing, or do you try to at least have the start of an estimation,
and maybe start the conversation with your organization or your provider?
Yeah, fantastic.
And you guys are putting some really concrete things out there for Python developers.
Two quick high-level comments.
One, Corey Adkins from the live stream says,
would it be the same or worse for quantum computers?
Okay, I'm going to talk out of my depth here.
So the first, the best answer I can use, I don't know.
And then to go beyond that, my understanding of quantum computers is that they do very different
things.
And you can't just compare the computations made on classical computers with the things
quantum computers are intended for.
I think intrinsically, because of the state of that technology, it is extremely energy intensive,
just because you usually have to pull things down to a few millikelvins or something like that.
So that may be transitory.
I'm not sure.
I don't know about that either.
I was thinking the same thing.
You know, just yesterday, Google had Google I.O.
And they talked about building clusters of qubit sort of supercomputer type things.
And apparently, they've got to cool it down so much that it's some of the coldest places in the
universe inside those.
So on one hand, if quantum computers can do the math super quick, it doesn't take a lot of time
to run them to get the answer.
But on the other, if you've got to keep them that cold, that can't be free.
But it's a very particular kind of math, right?
And not all problems are translatable from the classical formulation to a quantum compatible
formulation.
I'm not sure.
I think there are problems that we can solve easily on our classical computers that would be
very hard, if not theoretically impossible to run on quantum computers.
And it's like, it's a different tool and it's not intended for the same problems.
So I think it's hard to compare.
Yeah.
You will still have some parts of the model training that won't run on quantum computers
because that doesn't make sense.
Like pre-processing data, getting data from your different data source, mapping them to a
common format, exporting your model, creating Docker images, servers.
There will still be part of the model training process that won't run on those quantum computers.
This portion of Talk Python to Me is brought to you by Square.
Payment acceptance can be one of the most painful parts of building a web app for a business.
When implementing checkout, you want it to be simple to build, secure, and slick to use.
Square's new web payment SDK raises the bar in the payment acceptance developer experience and provides a best-in-class interface for merchants and buyers.
With it, you can build a customized, branded payment experience and never miss a sale.
Deliver a highly responsive payments flow across web and mobile that integrates with credit cards and debit cards,
digital wallets like Apple Pay and Google, ACH bank payments, and even gift cards.
For more complex transactions, follow-up actions by the customer can include completing a payment authentication step,
filling in a credit line application form, or doing background risk checks on the buyer's device.
And developers don't even need to know if the payment method requires validation.
Square hides the complexity from the seller and guides the buyer through the necessary steps.
Getting started with a new web payment SDK is easy.
Simply include the web payment SDK JavaScript, flag an element on the page where you want the payment form to appear,
and then attach hooks for your custom behavior.
Learn more about integrating with Square's web payments SDK at talkpython.fm/square,
or just click the link in your podcast player's show notes.
That's talkpython.fm/square.
Another thing I think it's worth pointing out is it's the training of the models that is expensive,
but to use them to get an answer, it's pretty quick, right?
That's pretty low cost.
It depends on what you're using it for, right?
So if you have a user-facing model that's going to serve thousands of requests per second,
then deploying it for a year might be more energy intensive than training it for three days.
We all know the machine learning lifecycle is not just like you train one model and you succeed and well,
hooray, right?
You usually have a lot of iterations, building the models, looking for hyperparameters and so on.
But even if that takes six months and your model stays online for months or years and serving thousands of people,
it's not obvious.
It might even be worse, not worse, more energy intensive.
Yeah, I guess it depends how many times you run it.
Another thought, you know, there's a lot of places creating models, like you talked about,
was it GP3, GPT-3, and whatnot, that are training the models and letting people use them.
Do you see that as a thing that might be useful and helpful is having these pre-created, pre-trained models?
Like I know Microsoft has a bunch of pre-trained models with their cognitive services,
and Apple has their ML stuff like baked into their devices that you don't have to train, you can just use.
Are the problems being solved and the data being understood usually too general,
or is that something we can make use of?
I think pre-trained models are the advantage to keep, as you are training a model once,
the cost emission of the model during training is amortized for each usage.
So the more user you have, the more part of the training emission is low.
But usually you still have to tune the model a bit, so you still have to train it,
and you're using energy even for prediction.
So yes and no.
I'm going to also do the transition to throw the ball to Jonathan for something I think we shouldn't forget
when we talk about these gains in efficiency, which is like Jevon's paradox,
and the fact that if you create something that is cheaper to use, and more people use it,
then the overall impact is lower.
And I think this is something we tend to forget when we talk about massive improvements,
or not even massive, just like this is something that is, I think, hard to grasp and anticipate
when you think about technological advances under the constraint of climate change.
But this rebound effect is something we should plan for and not just think, well, if you have cheaper models,
but more people can use them, I think it's not that obvious that it's an overall gain in terms of energy.
Like then you can talk about all the societal consequences and the advances in cancer research.
It's really hard to have a definitive answer.
Yeah, just to build on what Victor said, it really is a difficult, I mean, this is a classic environmental conundrum, right?
When, you know, the classic example of the Jevons paradox is, you know, adding more roads leads to more traffic
because more people believe that there's more space for them to drive.
And so you've seen this over and over again in all sorts of different contexts, that when you build these tools,
more people will use them and that can end up costing more than not building them in the first place.
So I think this is something to really be aware of, you know, as we're democratizing these kinds of tools.
There's a real pro here.
There are some real strengths of having these tools, you know, easily accessible and that can be used.
But one has to worry about the potential costs of, you know, having all these tools being employed,
in particular being employed in all sorts of different kind of sub-energy grids around the world.
Not all grids are, you know, connected up to solar panels.
You know, many are connected to coal-fired power plants and that can outweigh the cost.
Yeah, we can hope, but it's not today, is it?
Yeah, not yet, not yet.
One would hope, but maybe soon.
One last thought about pre-trained model is usually they are trained for more diverse usage.
So I would think that they tend to be larger than model trained, especially for a single usage inside a single company with a single type of data.
So I would say they are likely bigger, so they use more energy to train and to use, but by homage, I couldn't say.
Yeah.
Well, I think the paradox that you all are speaking about, you know, one of the ways we could see that is just the ability to use machine learning to solve problems is so much easier now.
That what used to be a simple if-else runs in a microsecond is now a much more complicated part of your program.
And so, yeah, there's got to be just a raising of the cost there.
Now, before we make it all sound like machine learning bad for the environment, 100%, there are good things, you know.
Google, like I said, Google I.O. was yesterday, and they were talking about doing the navigation so that taking into account things like topography, speed, and whatnot, to actually try to optimize, minimize gas consumption with the directions they give you, right?
And if they could do that with a little bit of computer code to save a ton of CO2 out of cars, like that's a really big win.
More ML.
Definitely.
And I think the reason why we're like, we have started with the online carbon emissions on our side at Mila in Montreal, and Jonathan and colleagues at Haverford with energy usage, and then we came together for quick carbon.
It's not to say that machine learning is bad, like just as most technologies, it's technology, and it depends on how you use it.
But where we're going as societies under the constraint of climate change can't leave any field out of questioning themselves of how they use their resources.
So, yeah, it's something you can't leave out of the picture, which doesn't mean that you can't use it.
It's like you have to think about it, and we can't have a single rule for everyone.
It's just you have to take that into account, and you can very well make the decision that it is worth it.
In many cases, it will be.
Sometimes, maybe not.
But be conscious of it.
Yeah, for sure.
All right.
So, I think that brings us to your project, Code Carbon.
You mentioned it a couple of times.
So, looking in from the outside, it seems to me like the primary thing that what you guys have done is you've built some Python libraries, a Python package that lets you answer these questions and track these things, right?
And then a dashboard and data that will help you improve it.
Is that a good elevator pitch?
Very good.
Fantastic.
All right.
So, tell us about Code Carbon.
Do you want to work for us?
Yeah, sure.
I'm not busy enough yet.
We don't have any money, though.
Oh, good.
No, but I think it's a great cause.
And so, tell everyone about it.
Thank you for the opportunity.
I think one of the reasons we came together was like, we all know that in the machine learning lifecycle, a lot of the computations you just forget about because there are so many experiments that you run.
Like, say you have a project and you're going to work on it for like 3, 6, 12 months.
How many experiments are you going to run?
How many hyperparameter searches are you going to run?
It's a very important problem.
I think this is also something that is central to Comet.ml, which is the company where Boris works.
They manage experiments.
And I use that in my daily work.
And I thought, well, we need something similar to track the carbon.
It can't just be about the metrics.
It can't just be about the images you generate because you're turning a GAN, for instance.
So, how do we go about this?
And, well, because Python was, I think, the go-to language for AI research and development also.
Although, in very optimized settings, you might want to go away from that.
But we thought, well, we need to do something that is going to be plug and play.
So, it has to be Python.
It has to run in the background.
It has to be light.
And it has to be also something that is versatile in that it is not only about you're just getting yet another metric, but it's also about understanding what it means.
It's about also education.
It's about education for yourself, but also maybe for other members of your organization.
The people who might say, like, say you work in a company and you're thinking, well, I have hundreds of data scientists.
Like, this is not marginal.
I want to have an estimation.
And if estimation is not good enough for you, well, contact your provider and maybe have a wattmeter plugged in somewhere where it matters.
It's not my expertise.
But that's basically the idea.
Yeah, yeah.
Well, I think plugging in a wattmeter somewhere, that used to be a thing that you could do.
But now it's Amazon or Azure or Linode or whoever.
They're not going to let you go plug it into their data center.
And if you did, there's probably a bunch of other things happening there, right?
Direct access to the compute resources is just hard to come by.
Yeah, exactly.
This is a very big constraint for us.
I think I expect we'll get into a little more details about that.
But this is why you need to understand carbon as a tool to estimate things and have approximations.
And we use heuristics.
And basically, if a consultant is having you pay for carbon offsets based on those kinds of numbers, you shouldn't pay.
Because that's not the point.
Yeah, it's really about giving you the information.
One of the things I like about what you're doing is you can recommend other areas.
Like we talked about, like you could switch to this data center.
And then it would have this impact, right?
Yeah, I think it's part of the educational mission.
It's like we all know, or at least I wish we all knew or we want everyone to know.
I don't know how to put that.
But that it's the climate change is a very serious threat.
And being conscious about your energy usage and your consumption of resources in general is one thing.
It's very important.
But then I think you consciously leave people out there with that feeling of guilt.
And there has to be actionable items.
Changing your region is probably the easiest thing you can do, especially in the age of the cloud.
And at a time when basically moving your data across continents is about picking a few checkboxes on a web interface.
Yeah.
I think just to pick up a little bit on what Vic Victor has said here is that the educational part of this is a very important part of the Code Carbon project.
Because we know as we have been involved in this, that answering this question, like what's the CO2 footprint of my computational work, is actually a very, very difficult question to answer.
And it's opaque for a variety of reasons.
It's opaque because the way that the energy industry deals with CO2 emissions is pretty opaque, unless you know the language of how they express this.
And it's also difficult to understand when you are able to make the calculation, what does that mean?
What's one gram of CO2 emitted relative to, say, everyday activities?
So one of the things that we've tried to do as part of this dashboard is simplify those two steps for people.
Because we've been approached by people via email, via Slack, and we know we're not the only people concerned about this.
And so this is just a way to help make these approximations both visible, but also kind of comprehensible and put it in the context of human activities.
You're right.
There's a lot of layers and, you know, companies that run the clouds, they are trying to be more responsible with their energy.
But you don't know.
A lot of times you don't know if this data center, US, East, one, and AWS, how much energy from different sources is that actually using?
How much have they actually built their own solar and wind?
We don't know, right?
But you get a better sense using your tool.
You've got better data than the random person who just kind of estimates, well, they're doing some stuff, so it must be fine.
Another important thing I think is, and Jonathan is much more an expert in that than I am, but not emitting is very different from offsetting in whatever way, wrecks or whatever.
Yeah.
Your emissions and our atmosphere, our climate has inertia.
And the expected compensation in 5, 10, 20 years of your current emissions.
Those are two very different things, right?
And it's much easier to put carbon in the atmosphere than taking it away from it.
And so I think it's not just because you read Google and others, Microsoft are carbon neutral, which comes from compensations of many forms.
It doesn't mean no carbon was emitted, right?
Yeah, there's just to build on Victor's point again, you know, there's decades of research in sort of what you'd call, you know, environmental psychology, explaining to people the consequences of inaction or, you know, of diffuse environmental costs to a particular action causes long-term behavior change.
And I think, you know, one of the things that's been really exciting about seeing the, you know, the machine learning and AI communities kind of like grapple with this question in a very public way is we've started to see articles of, you know, pressure being put on organizations to why don't we have more green energy infrastructure, you know, undergirding our work.
And so, you know, the speed at which this has become, you know, a public conversation is really heartening, you know, as somebody who's been working in the environment for quite a bit of time.
Yeah, I would say it does seem to be getting a lot of attention, which is good.
It's a big problem.
But attention instead of just head in the sand is a really big deal.
Like we've been driving cars for a long time.
We've been flying planes for a long time.
There's a lot of like raised trucks with super big wheels with, you know, dual coal stack pipes on them, right?
Like that's, I can't speak for everyone that gets a truck like that.
But I feel there's a lot of times when we have these conversations, people are just like, well, this is so horrible and so vague that I'm just going to live my life and enjoy it.
Because I seem to not be able to do anything anyway.
So I might as well have fun instead of not have fun while things are going wrong, right?
Like that's kind of that psychology, right?
And so I don't know.
How do you all deal with that?
It's also something that like when it's not before your eyes, it's much more difficult to answer, to understand and to respond to.
And I think this is part of what we're seeing today with decades of activism is like facts, hard facts are not enough to convince humans.
And then to some extent, it's also a good thing.
And it has, I think, value in our recognition.
But it also has this downside that it's just because you say a number to someone, if they don't understand it, if they don't see it for themselves in their everyday life, it's going to be very hard to understand.
So until you have used something like Code Carbon, like I code every day, I train models every day, and I train a model for five days on a GPU in Quebec.
That's my daily life, basically.
And some might find it dull.
I like it.
Anyway, that's not the point.
I mean, until you have that and you're like, oh, this is what I do.
Those numbers start to make sense.
Even if you have numbers for your day to day, that doesn't seem that much, like thousands of grams or kilograms.
But once you sum all the emissions for all the model trained, for all the machine learning teams, for all the machine learning data scientists, for a company for a year or even for academia, that start to get, depending on your size of the company, of course, that start to get sizable.
And you might want to take a serious look at it.
Yeah.
I want to dive into the code and talk about this.
But I guess maybe speak really quickly to, I work at a company.
We make shoes.
They want me to use ML to figure out how to get better behaviors out of the materials for track runners or whatever.
So I do that.
That company, how do I get that company to say, yes, we should measure our scientific data science work and we should offset it?
There's a lot of layers between the people who care about shoes and sales and people who care about machine learning carbon offsets.
My personal understanding of this situation is that empowering individuals with tools and numbers to convince organizations is part of our mission.
So if what the person in charge, whatever their role in the organization, thinks that in order to have an estimation of their carbon impact, they have to find a consulting firm, pay people for five weeks.
If they think this is the process, they're going to be reluctant.
And I can understand why.
If you have a plug and play tool that even you as the evangelizer, if that's a word, you get the idea.
Yeah.
It doesn't cost you much to try.
The way we want to build this thing is just like one import and full of lines.
Yeah.
So, yeah.
So let's talk about the code.
I think maybe the answer, maybe an approach that you could have there is we'll run something like this on all of the training that we do.
And then we're going to report up our division in this company generates as much carbon.
So if you care about carbon, you need to take that into account.
I think that's a good selling point.
I think as we can see today together, I mean, those conversations are hard and long and it's not easy to understand all that matters.
And you may need that consulting firm in the end to help you understand what's at stake in your whole value chain.
You got to start somewhere.
Right.
And if you're an individual and you want to change your organization, well, I think if you want to have an impact, those kinds of tools should be easy to start with.
And then, as we've said, it's not enough and it's not precise enough.
And then there are other steps you can take.
But you need to get the conversations going and started.
Yeah.
And to start that, you got to start measuring.
So in order to do that, let's talk about the code.
It's literally four lines of code.
It's all you got to do.
So you pip install Code Carbon and then from Code Carbon, import Emissions Tracker.
Create one.
Tracker.start.
Do your training.
Tracker.stop.
And that's it, right?
Right.
And with the decorator solution, it's seven, two lines of code.
Yeah.
With the decorator, you can just put a decorator on a function.
And then basically any training that happens during that will be measured and then saved to a CSV file.
Right?
That's correct.
And if you think a context manager should be implemented, well, you're welcome to create a PR.
It's going to be super easy.
Everything is already there.
Yeah, exactly.
I can already see it in my mind with Emissions Tracker, you know, as Tracker.
So it creates one of these CSV files and then what?
So there are a bunch of things that happen.
If you want to, like, the two big steps are, one, you look for the hardware you understand,
like Code Carbon understands, then you track those, you measure the energy consumed, right?
And so you have that, basically, you measure the energy.
And then next step is, well, how much carbon does energy has emitted?
How does energy emitted?
And so you need to map the code to your location.
Right.
And do you do that by just, like, a get location from IP address type of thing or something like that?
So you can either do that or provide the country ISO code for a couple of countries, Canada, the US.
We have regions below the national level.
Another thing that you can actually do is, well, it's not going to help you with the location,
but it's going to help you with the carbon impact is we can bring CO2 signal,
which is an API that is being developed, the electricity map, initiative, group, organization, company,
whatever their status.
And so that's going to help you an exact estimation at that moment in time,
depending on what data you have of those computations.
Otherwise, we need your country code and we're going to map that to historical data.
This CO2 signal, this is new to me.
What is this?
I think you'd better look at them.
Exactly.
The electricity map.
Look at the map.
Exactly.
Yeah.
So they have products, they have predictions of carbon emissions and so on.
But that's basically, it's an initiative.
The organization is called Tomorrow.
The goal here, at least with the electricity map, is to gather data about carbon intensity
and the energy mix of countries through the forest of APIs and standards countries have for countries and companies and have for that kind of thing.
So you can see that in Canada, not all or in the US, not all regions are going to work similarly.
And some regions might not even provide that kind of data in the open.
Yeah, that's too bad.
Yeah, but it's really different depending on where you are and just even the US, right?
Like in the Pacific Northwest, I think it's like very high levels of hydro.
Southeast, a lot of coal still.
Like it's not just what country.
It's even like maybe a little more granular than that, right?
No.
At least for large places.
And also, as you can see, I think this is also a very interesting map because you can see that energy grids are very different from the grid that you know, like nation, state, whatever it is after that, right?
Yeah, county, city.
County, city, all of that.
Like you can see, for example, the one that spans something like Iowa.
Italy, for example.
I was thinking, it already are like this thing that goes from Montana to Texas or something.
Yeah, that doesn't look like any state I learned in school.
No, but it's probably it's unified grid for some reason because providers got together for under some constraint.
Yeah, exactly.
So when I'm looking at this code here, I run that and then I get this map and it can give you recommendations on the cloud regions, right?
And where you might go.
So for example, CA Central 1.
This is something that we might want to change, right?
The UI of this thing might not be obvious, but you're on the left.
This, I just want to specify clarification because I even, I sometimes forget.
I'm like, where did this, where was this thing run?
That's actually, yeah.
You run on the left and we show you how it could have been different.
Interesting.
Somewhere out.
Yeah.
So if I pick say US West 1 for AWS versus EU West 3, you can see the relative carbon offset or production.
Yes.
How bad that was or how good it was.
And these are all comes from those reports generated out of that CSV file.
Exactly.
That's correct.
I just want to be clear about how the data was gathered.
That's a very important topic.
So we still need to update the data for GCP, Google Cloud Platform, because they recently released those numbers.
But for most of those locations, we had to make an assumption.
The assumption was that the data center was plugged to the local grid.
So if a data center is in Boston, we assume the data center uses the same energy as Boston's grid, which might not be the case.
Right.
Many providers would not now have their own solar panels and whatnot.
So that might not be the case.
And so, but unless they release those numbers and I can find the link, I'll share it with you.
Unless we have those numbers publicized by the providers, I mean, there's only so much we can do.
Yeah.
So, yeah.
Well, here's a call to action for those who haven't released it.
Get on it, right?
I think it was part of Jonathan's message earlier, which is like, there are so many layers and so many of them are opaque.
That's part of the, I think, our responsibility as users.
Yeah.
I don't like to put too much weight on individuals' shoulders.
And I think structural changes have a much wider, well, much more potential.
But I think it's still interconnected.
And if you can do something about it, well, you should.
Yeah.
Let's talk a little bit about running it.
So when I go over here and I say start and then stop, like, how do you know how much energy I've used?
I mean, I know once it leaves the computer, like, there's a lot of assumptions and various things like we talked about.
But how do you estimate how much that that code has taken?
That's a very good question.
And Victor, can I answer this one?
Oh, yes.
Sure.
Okay.
When you're training and you're running a machine learning program, you are mostly using GPU.
And you are mostly using NVIDIA GPU.
And thankfully, NVIDIA has a nice SDK to get, at a given time, the current estimated plus or minus 5% energy usage of the GPU.
So we get...
Oh, really?
Okay.
So it's not like you're saying, oh, it's a 3070 super and it must be pinned CPU-wise or GPU-wise.
So let's just assume this much time times this kind of computer, it gives you more narrow, exact measurements.
Okay.
Fantastic.
We still get the energy consumption from all GPU.
So if you are training multiple models, we might get higher or lower energy estimation.
I'm not sure there.
So that's for GPU.
For CPU, we are supporting Intel.
And we have several ways of doing that as we get a measurement at the beginning of the training and at the end.
And we get the total energy usage between the two.
So we can get the difference.
Or we can also regularly get the immediate usage, I think.
We are working to add memory usage because even if GPU and CPU are the topmost resources that you use for multi-gigabytes,
it tends to be not negligible.
And once you get...
Probably disk as well.
Yeah.
Everything takes energy.
The goal is to focus on what takes most of the energy and how easy it is to get that consumption.
So you get all of that either during the training frequently or at the beginning and the end.
In addition, we get the duration.
And we detect if you are running in a data center or not.
So in case we don't have access to anything, like you are running on AMD GPU, on an AMD CPU, on Windows,
we can still give you an estimation based on the duration, on your estimated location.
Or if you are running inside a data center or a specific location, we can also get a more precise estimation for you.
And we are measuring what energy usage.
And then we can use our data to estimate again, like estimation of estimation, the CO2 emitted for that usage.
I don't know how deep you want to go into how it works, but I do want to point out that...
Give us a little look inside.
Yeah.
Given that it's one of the most difficult areas, I think I also want to use your platform to call for help, which is...
It's actually the low-level inner workings of CPUs are hard to understand.
At least for me, I have a background and I'm a researcher, right?
So it's an area where we need help.
Not necessarily a hardware specialist, right?
And writing on hardware, yeah.
Exactly.
And so, for example, the way we read the energy consumption of Intel CPUs, I mean, the GPUs, as Boris said, have, at least NVIDIA's GPUs, have this driver that we can ping.
And NVIDIA SMI is all the INVML package is very useful because we can just ping this and not care about how it's done and trust NVIDIA and use that number.
But for the CPUs, it's much more complicated.
The reason is that what happens under the hood is modern Intel CPUs under the right settings write, actually, their energy usage, millijoules to a textile.
It's the Rappel interface and they write to a textile the number of millijoules they have consumed since, I don't know when, since they were turned on or the 1st of January 1970 or whatever other random date.
Yeah.
What matters is that and we look at the difference in it.
But those numbers are written by the CPU socket.
So let me give you an example.
In the academic setting where I work, we have shared clusters.
I can request part of a node and I'm going to request one GPU and 20 CPUs to do my computations.
But what I saw looking at the Rappel files is that there are two sockets of 40 CPUs.
Like we have 80 CPUs per node and two sockets of 40.
So there's no way to read from the Rappel files.
Your granularity is 40.
Yeah.
Like the CPUs that are allocated to me might change over time.
Maybe not.
It depends on the resource manager.
You use Slurm and those CPUs will be split across those two sockets.
And so we have that level of problems too.
So the high level, you're working in a dedicated environment and it's only your program, then
Rappel is perfect and we couldn't have dreamt for something better.
But it does not allow us to go to the core, let alone the process granularity of power consumption.
So I just want to put a big warning here.
And one of the things that we need to look into, and it's very hard and there are no good numbers.
Maybe even what I'm going to say won't make sense.
But the only solution we have left is, is there some kind of heuristic to map the CPU utilization
to the energy consumption, basically.
Because otherwise, we're never going to be able to attribute your processes and sub-processes'
CPU usage to WAPs, basically.
Because of this Rappel setup that is written by a socket.
And I've talked a little to people who understand this way better than I do.
And they thought this endeavor was very risky.
And they were pessimistic.
But I mean...
And you're like, what else do we have to work with?
Yeah.
And so I think next thing is like, we're going to need to get our hands on hardware, have
it run and see how bad it is.
And it's going to be one setup with one mode for the compilation of the math libraries I'm
going to use to benchmark and whatnot.
Like, there's only so much we can do if the hardware providers don't give, don't tell
us more.
It would be nice to see operating systems and then the hardware providers as well allow
you to access that information, right?
Like, how much, you know, how much voltage am I, how much am I currently consuming with
just this process, right?
And you don't want to profile it.
Because if you profile it, you'll be like 50% of the problem, right?
And you'll slow it down and people won't want to touch it.
And talk to people at Power API and Pyjool initiatives.
And even they, from what I remember, explained that even if you had total control on the hardware,
on the software, or the hardware, both of those things are going to be so dependent on the way
you compile the libraries you use.
And a number of other facts that it's even the very definition of those things that we're
looking for is not obvious.
Or whether it's Linux versus macOS versus Windows, it's got to make a difference.
It all matters.
And the reason why I think it's still worth looking for an approximation through CPU utilization,
even if it's a bad proxy, is it's all bad proxies.
So why is it like, it doesn't matter if you're precise to the millijoule on your CPU,
if your uncertainty around carbon emissions is huge, right?
Otherwise, you end up with something as much carbon as five cars, right?
And so...
We can get it down to 2.1 or 2.2 cars.
Come on, let's go with that.
Yeah.
So it's really a very complex endeavor.
Yeah.
Yeah, absolutely.
So it sounds like it runs on multiple platforms.
We'll try to, at least.
Yeah, yeah.
So Windows, Linux, macOS.
Exactly.
I'm sitting here recording on my Mac Mini M1, Apple Silicon.
Can I run it here?
Yeah.
You would need to install the Intel Power Gadget, restart your computer, allow specific security
permissions.
Not an Intel CPU.
So I'm guessing you will be back to the simple realistic base on the duration.
We realized, actually, the Intel Power Gadget also tracks some AMD CPUs.
Like, we had a user say, like, you don't seem to support AMD.
And then they still installed the Intel Power Gadget.
I don't know why, but they did.
And then it worked.
So I'm like, I'm not sure how this thing works.
So Intel AMD, but maybe not Apple Silicon.
I don't think so.
Okay.
Well, probably most people won't be doing training on that.
The Apple Silicon platform has a dedicated course for machine learning, you know?
It does have, I think, 16 ML cores.
Yeah.
So yeah, maybe.
Maybe they are.
They're coming out with the Mac Pro, which is supposed to have Mini Mini 4.
So maybe that'll be where people do it more.
So if Apple is hearing you.
Yeah, pretty.
Is hearing us.
Send us a Mac Mini and we'll work on improving the tracking of.
And one Mac Mini is for all three of you.
The whole team.
Come on.
Let's send it along.
Make it happen.
You have my Twitter handle.
Send me a message.
Fantastic.
All right.
Let's see.
Before we move on, quick question from Brian in the live stream.
Other than moving to different data centers, what are some of the highest impact
changes people can make?
Different training methods and so on.
And by the way, that also leads exactly into where I was going.
Thank you for that.
A very timely question.
Like patterns and things you can do.
Let's talk about that.
One of the things that we wrote in the carbon emissions of machine learning paper on the
website is, well, there's hyperparameter searches.
Like one of the worst thing you can do, both in terms of pure ML performance and carbon emissions
is grid search, for instance.
So maybe just don't do that.
There are, if you're lazy, just do a random hyperparameter search.
Or if you don't have a good metric.
Or use Bayesian optimizers and so on to look for those hyperparameters.
Another thing that is not mentioned in that paper, but I think is still very important.
And that cycles back to one of your first questions about insurance versus training is,
there are many methods out there.
Pruning, distillation, quantization, all of like all that zoo of tools and techniques
and algorithms to optimize your model.
And if you're happy with your current model, chances are there are many techniques out there
that can reduce its size and computational complexity by multiple factors.
So if you're going to put a product out there with hundreds, thousands, millions,
of inferences, maybe just think about that.
I expect people who deploy such tools do think about that.
If you're deploying a tool for millions, I mean, it's in your interest to think about it
because it's also going to be cheaper.
They probably think more about it in terms of just time, time to train, time to get an answer.
But that also is exactly lining up with energy consumed.
So, you know, CO2 reduction comes along for the ride.
Yeah.
It's often the case that if you invest in ecological solutions, they are going to end up being economical.
Jonathan, it's more of your area.
Maybe that's another bold pro to you.
Oh, I couldn't underscore that more.
I think, you know, something that I think that has come out of our results that we've seen is that
there's not a strictly linear trade-off between energy usage and accuracy, for example.
There's often, there's a shoulder usually there and finding that shoulder using code carbon to figure
out, you know, if I throw this fraction of a kilogram of CO2 at this problem, I'm actually
going to get a lower accuracy than if I had stopped beforehand.
So using a tool to figure out where that is, I think is very helpful.
And so just being aware of the impact of it and trying to maximize for accuracy and not just energy usage.
Yeah.
One of the things you called out is more energy, which means more emissions, is not necessarily
more accuracy.
Yeah.
Adding on more practical solution.
For example, when you're doing hyperparameter search, which is basically, are you doing the
combination of numbers of variables and try to find the best combination to get the best results,
the best, more precise model or whatever metrics you're optimizing for?
You will likely, most of the machine learning libraries have an option to do early stop.
Like instead of doing training new model for four days for all hundreds of thousands of combinations,
you train 10 of them for one day and then you see how it evolved.
And if you take only the two best of them and try again, you can reduce your training time
and emission by a lot of percentage.
And on other protocol, you can also move all known, all the code that doesn't need GPU to
run something somewhere else, like for CPU, then you start on disk, it's still emitting less
emission than not using the GPU on your server.
And try to use your GPU better, even by training more model on the same GPU or changing your model
to be more efficient to train in less time.
One of the things that we've also advocated for, and it can sound a little naive, but as
Jonathan said earlier, like this field has been moving fast is to publish and be transparent
about those things.
And I think if the community shows interest and shows that it is one of the broader impact
features that they look for when they think about the systems they create and deploy, I
think it's also something that can spread in other areas than just your very specific niche
of research.
For instance, I'm thinking about the research community here, but that's my environment.
But I think it's also the case in the industry.
Another thing that you all talked about is if you're computing locally, so maybe at your
university or in your house these days, that's probably where you are.
The local energy infrastructure matters, right?
It does.
Like, for example, Quebec has an average of like 20 grams of CO2 per kilowatt hour or something,
which is probably 40 times lower than some other regions.
You can check the, well, no, because Quebec doesn't share the data with electricity map.
It's a shame.
But you can see other, like if you just compare the results in Europe, for instance, and you
look for France, which is...
Like France versus Germany.
Yeah.
It has a nuclear electricity grid, mostly France, right?
So if you compare France to Germany, it's going to be very different.
Look at that.
95% low carbon.
That's well done, France.
Good job, Boris.
I think if you click on Germany, what you'll see is you might have a time series somewhere
for the last 24 hours.
At least have this nice breakdown over here and you can move it.
Yeah, there's your time series.
Right.
So you can even see that during the day.
It's not the same.
And just like your electricity provider will charge you differently for different times of
usage, like high demand or lower demand times of the day.
And like carbon emissions are also going to have that kind of variation that you could
care for.
One thing I wanted to give a quick shout out to, I don't know about different locations.
Here in Portland, one of the options we have is to choose a slightly different energy choice.
If we pay $6 more per month or $11 as a small business, it will basically be wind and solar.
And if your local grid offers something where you literally pay $6 and it can dramatically
change it, like, you know, do the world a favor.
Opt in.
We have the equivalent in France also.
Same in the United States.
There's a lot of, there's a patchwork of different state laws that mandate that these options are
made available to people.
So yeah, definitely take advantage of it.
Yeah.
It's, I mean, it literally is a checkbox.
Do you want to have this yes or no and a small fee?
And they probably, you know, honestly, probably what's happening when you check that box,
like some of that energy would have just gone to the general grid and now it's, it's promised
to you.
But soon as enough people check that box to go beyond the capacity, then that's going to
be an economic driver to make more of it happen.
Right.
So hopefully, hopefully we can get there.
Although I suspect data centers are where the majority of the computation happens.
It doesn't, I mean, I'm not backing this by any knowledge here.
I'm just, it's just my personal perception, but I feel it's like, it's too little.
Like, this is too cheap.
How come, like, it's so cheap, right?
So, so many things in our data lab should actually be more expensive if we knew how much energy
and resources and how much they cost the environment.
And so it feels like it's a no brainer when it's so easy and it's so cheap in this case,
but like how many other areas of our data lab and consumption have those, those biases?
Would you pay three times as much to fly, right?
Would you pay $3,000 to go from France to Portland rather than a thousand or whatever, right?
That's a harder thing than checking a $6 box.
Yeah.
And probably a harder solve a problem.
But luckily we're, we're talking about computers and ML and not air transportation.
So don't have to solve it here.
We'll do that next time.
Speaking of solving it here, you know, what's next?
Where are things going for you all in the future?
So I'm a PhD student at Mila in Montreal.
So it's a Quebec's AI Institute.
So I feel like I'm going to stay there for at least two or three more years until I PhD
and then we'll see.
But the other two, where are you going with this project?
Yeah, I think that we've got some things on the horizon.
One is that the other part sort of under the hood that's kind of complicated is deriving
the energy mix and getting the CO2 intensity of the energy grid from the energy mix.
So figuring out, you know, okay, if you know, you have X percent natural gas, X percent coal
and X percent oil, you know, how does that translate into CO2 emissions?
That's actually an extremely complicated problem to answer because we have different chemical
compositions of coal around the world.
For example, you know, coal that comes out of Kentucky has a different CO2 impact per,
you know, joule from combustion than coal that comes out of Wyoming, for example.
So we've got all these different layers to figure out.
For oil, you've got like the oil sands of Canada versus...
Exactly.
...Sahary Arabia or whatever, right?
Exactly.
Yeah.
And all of these sort of chemical differences, you know, matter and they reflect different
efficiencies.
And that's not even getting into the difference in hardware in different power plants.
So what we want to do is we want to actually dive in a bit deeper and get at some of these
regional differences in carbon intensity and plug them into the data set here so that,
you know, we can refine our estimates as much as possible.
Yeah.
And shout out to the cloud providers, provide more data.
Yeah.
To the CPU providers, provide more hooks, things like that.
My hope for the project is that in a few years, we don't need this project anymore because we are doing
estimation of estimation of estimation.
There's better people in the industry, cloud providers and hardware vendors that are suited
to get more precise data.
But until then, I hope that the project can...
Companies be aware of their mission, take action on that and allow the project to be more precise
and give some estimation range for everything we are measuring.
I feel like there are five to 10 companies in the world that can control all of the information
you have.
So we've got Intel, AMD, Apple for the chips.
We've got AMD and NVIDIA for the cards and Azure, AWS, GCP.
If they all provided more information, then this would be not much of an estimate, more of a measure.
A couple of comments from the live stream.
Corey Adkins says, thank you all.
I've recommended this package to my ML team, which is awesome.
And then Ryan Clark says, the efficiency varies widely between countries and whatnot.
But you sort of addressed that already with your comment about trying to work to understand
the different sources and how they...
Even though they both look like coal, for example, they're actually not the same.
Yeah, it's a really great question.
And it really is something that we've relied on data from the US because we have the highest
resolution of this and of the CO2 impact per energy consumed.
And we have the most transparency about the numbers.
It's not just a number in the end of a report or a footnote of a report.
We can actually trace it and do some due diligence on that.
So we've used those numbers.
But if anybody listening to this or hearing this has a connection with any of those companies,
the hardware companies, or knows how to get more energy data, we are always looking for
collaborators and contributors.
So please reach out to us.
Yeah, fantastic.
All right.
I know we're pretty much at the end of our time together.
So let me just ask you one really quick question.
I have a thing I want to, a model I want to train.
So I'm going to fire up a Docker image, maybe a set of them on Kubernetes and kick them off,
let them go do their thing.
Then I'm going to come back next week, have another idea that I'm going to train up some
more things.
Maybe my colleague is doing the same.
This is going to generate a bunch of a mission.csv files.
How do I correlate?
How do I put these all together so that I can see like, as a team, this month is here we
are.
Is that something that happens?
So I'm really glad you asked this question, because this is something we're working on.
So currently, I think you can just sum up those CSV files.
I think that's...
Yeah, it's up to you to keep track and like say, okay, here's when we're sending in from
this run.
CSV files have a lot of downsides.
It's less object oriented.
And you could have a JSON file that would be more structured and so on.
But at least it's very easily...
You can just concatenate them, right?
So...
I think it's totally good, actually.
It's more about the...
It's going to be transient files in lots of places.
How do I put them in one place so I see it as a whole?
Yeah.
What we've been working on lately with a team of volunteers in France with the dataforgood.fr
initiative is to create and deploy an API in a database.
So we want to create this online storage of the time series and not just the final sum and
have that in a hierarchy of ownership from the organization to the single run through teams
and projects.
That requires a lot of work.
That requires deployment.
That requires fans and sponsors to host that thing.
That requires a lot of engineering.
And I'm glad you asked that question because I also wanted to have one word about open source
and who's doing this.
And it's all about volunteers.
And no one is paid for that.
companies like Comet or the Boston Consulting Group, who've been a partner for more than a year,
do dedicate some software engineering time.
And we need more collaborations.
And if you think this tool is great and you want to use it, I think we would really appreciate
if some of you had time to help because it's a small team of volunteers.
I mean, it's the same for most open source projects out there and they need collaborators
and contributors.
And I think it's one of the things you can do also is help out.
And most of it is pure Python, right?
So chances are you're going to be able to help.
And or if you if you don't know Python, there's some data collection issues.
And it's just about writing to a CSV file.
You just got to find the time to go fetch those numbers.
There are data visualization issues to help improve the dashboard.
And so on.
So like it's it's never ending.
So everyone can help.
Yeah.
Sounds like a really great project to get involved in if people are looking to find an open source
thing to work on.
And we're willing to onboard you, which also is sometimes bumpy in open source projects.
And I think, I mean, it's hard and there are hundreds of guides of how to contribute to
open source projects out there.
I think we want people.
So like if you we're going to help you help us.
Yeah.
Very cool.
I encourage people to do so.
All right.
Final quick question before we get out of here.
Brian Hermsen says, I know this would be a big ask, but I would love to see this as a
built in profiler for CPU intensive ML libraries.
Yeah.
We just told you CPU is super hard.
Exactly.
Yeah.
I mean, it's I think this is going to go beyond what we know and can do.
But yeah, I agree with you.
It should be part of more decisions in computer science in general and software engineering and
hardware engineering and everything.
All right.
Let me ask you all the final two questions really quickly since there's three of you.
You're going to write some Python code.
What editor do you use?
VS Code.
Me too.
Sublime.
Sorry, guys.
I used to be a sublime fan, but VS Code is good now.
Yeah.
I feel like a lot of the sublime people have moved on to VS Code, but sublime is still popular
as well.
Notable PyPI package.
Maybe some cool library that works with some of the things you're all interested in.
Just quick.
Maybe people haven't heard of.
I like rich, which is a super flexible, colorful, versatile tool to print stuff instead of writing
again and again the same quacky print functions.
They call it a TUI.
A TUI.
Do they have it in here?
A TUI.
Some now use interface.
A terminal interface.
It's so good.
It's cool.
It's incredible.
Yeah.
And I just want to also give a shout out to computational open source libraries like
NumPy, scikit-learn, and Matplotlib, Pandas, and so on.
Because those things run the data sense world, and it's all open source, non-profits, and
it's a few maintainers, and they deserve a lot of the credit for the recent advances.
They definitely do.
Boris or John, either want to give a quick shout out to anything?
If I will do some shameless marketing, I would say the CometML, Python SDK, but more, I would
say as a FastAPI or some basis library that everyone uses, requests, and even just the
Python standard library, I know some CPython core developers that are doing a tremendous
job.
It's a stainless job, so thank you to them.
Yeah, for sure.
To them.
Yeah, everything Boris and Victor have recommended are great stuff.
Yeah, fantastic.
All right.
Well, final call to action.
People out there are listening.
They're doing machine learning.
They want to be able to use this to measure their work and maybe make some change.
What do you say?
Use it.
Contribute.
Evangelize.
Share.
I think most of the thing you can do about climate change is spreading awareness, discussing
those things, and challenging the status quo.
Yeah.
Fantastic.
All right, Boris, Victor, John, thank you all for being here.
It's been really great to have you.
Thanks so much for your time.
Yeah, thanks for having us.
Have a great day, everyone.
Bye.
Or evening, if you're in France.
Exactly.
Bye, all.
Bye.
This has been another episode of Talk Python to Me.
Our guests on this episode have been Victor Schmidt, Jonathan Wilson, and Boris Feld.
It's been brought to you by Square and us over at Talk Python Training.
With Square, your web app can easily take payments, seamlessly accept debit and credit cards, as well
as digital wallet payments.
Get started building your own online payment form in three steps with Square's Python SDK
at talkpython.fm/Square.
Want to level up your Python?
We have one of the largest catalogs of Python video courses over at Talk Python.
Our content ranges from true beginners to deeply advanced topics like memory and async.
And best of all, there's not a subscription in sight.
Check it out for yourself at training.talkpython.fm.
Be sure to subscribe to the show, open your favorite podcast app, and search for Python.
We should be right at the top.
You can also find the iTunes feed at /itunes, the Google Play feed at /play,
and the direct RSS feed at /rss on talkpython.fm.
We're live streaming most of our recordings these days.
If you want to be part of the show and have your comments featured on the air,
be sure to subscribe to our YouTube channel at talkpython.fm/youtube.
This is your host, Michael Kennedy.
Thanks so much for listening.
I really appreciate it.
Now get out there and write some Python code.
I really appreciate it.
Thank you.