Latest / Agentic Conversations (formally mlops.community) / Real-time Feature Pipelines, A Personal History // Hendrik Brackmann // MLOps Meetup #46
Transcript
- 0:16We have the guest of honor coming to talk with us.
- 0:20I really appreciate you coming here and drink.
- 0:23This is your kindred spirit because our last names are
- 0:28pretty much the same just One letter off almost Minds.
- 0:32Brinkman yours is Brockman but you left Germany.
- 0:37I think and I'm actually I'm actually stuck know in Germany
- 0:43since my fight back with constant.
- 0:44But yeah, usually I live in the okay, so I'm working for a small
- 0:50business bank hog-tied and and leading up the data function
- 0:55there. So trying to build both M and
- 0:58other text and data science capability.
- 1:00Lettuce. And it's been quite quite a,
- 1:01right? Yeah.
- 1:03And and for all of the Americans that are with us today, don't
- 1:07get confused. Tide, is a financial.
- 1:10It's a fintech, right? It is not the stuff that you use
- 1:14to clean your clothes. There are two different Tides
- 1:18which can be confusing. But now that we've got that out
- 1:21of the way, I'm really excited to dive in today with you about
- 1:27your journey in machine learning and typically these three
- 1:31different jobs that we spoke about before and how you had
- 1:37basically an ml Ops understanding and it grew from
- 1:40one job to the next and you were able to iterate and make things
- 1:44better and make things better and until you landed at where
- 1:47you're at right now. So we're specifically going to
- 1:50be talking about feature pipelines but anything that you
- 1:54want to add a long, the whole ml Ops basically, Is greatly
- 2:01appreciated to any insights that you've had.
- 2:04We should probably start with just learning about how you got
- 2:07into Tech. And yeah, how did I get into
- 2:10Tech and kind of very coincidental.
- 2:13It's to be honest and I always enjoyed automating things and
- 2:23kind of using technology to help improve decision-making.
- 2:29Help. Yeah, but data related
- 2:32applications. And so I was when I was at Uni,
- 2:35I was helping a company to boot, like, option pricing algorithm.
- 2:41So, I originally wanted to be a Trader, like doing some kind of
- 2:44algorithmic trading and then, through some circumstances ended
- 2:48up Consulting with. Yeah, credit companies and was
- 2:54building statistical models. For them.
- 2:55At that point, I didn't even know that data science was a
- 2:58thing and So I only after the fact realized that what I've
- 3:04been doing all along was branded data science in kind of a very
- 3:07different Community. Oh nice.
- 3:09And from there, I was starting to learn more about the
- 3:13different ways that people were thinking about problems that we
- 3:17previously discussed from very different angles.
- 3:20So my background is math econ and specifically probability
- 3:23Theory. And so it was yeah very
- 3:26interesting transition in that sense.
- 3:29Nice. So then you went out, you got
- 3:32your first job and this will be like a, I almost look at it.
- 3:37Like three epic Journeys that you had along the way.
- 3:41Because when we were talking about this and when I asked you
- 3:44to come on the Meetup, do you explain to me your different
- 3:49roller coaster rides that you've had over the past years?
- 3:53And so maybe you can start with that first one, give us a little
- 3:56bit of an idea of when it was because I know things have
- 4:00changed. The lot since then, and then
- 4:03just talk us through what was happening when you were working
- 4:06there. And what, what problems were you
- 4:08trying to solve all of that good stuff?
- 4:11Yeah so and I think like a lot of what you're going to get
- 4:15here. It's not what I think modern ml
- 4:17Ox architecture looks like it's more around like things that we
- 4:22did in the past in the personal earnings that I drew from it.
- 4:25And so the first one was around 2014 I think and so I He's
- 4:30working for a credit company there and we were trying to
- 4:35Mariska says companies that were were coming in and there were
- 4:40some interesting aspects to that from like technical point of
- 4:45view. So the first one was the
- 4:48problem. The primary one is these were
- 4:50new companies that we've never seen before.
- 4:52So I think a lot of the architecture that front time
- 4:57were were a lot of focused on data Pipelines.
- 5:00Or companies where you already have data and you later
- 5:02warehouse and you are trying to, yeah, score them based on some
- 5:10kind of behaviors that you already had previous experience
- 5:13for me, because a lot of the data in the data warehouse
- 5:16specifically, at that time had quite a huge delay behind the
- 5:19the operational system. So it wasn't really possible to
- 5:24use that data for your operational scores and that was
- 5:28one thing. And then also the just Putting
- 5:30models into production has been a lot more difficult and at that
- 5:34time than it is today. So at that time, we had a back
- 5:38end that was written in C sharp. And there weren't any kind of
- 5:41like easy ways to build microservices or we didn't know
- 5:44about them anyway, and we wrote most of our model training in
- 5:49our at that point. And so we had this big problem
- 5:51of and putting the model that was, I mean, the end like
- 5:55something that exists in our code, into our back end.
- 5:59So what we ended up doing Was he figured out there was a language
- 6:02called an F sharp and which yeah it's kind of functional C sharp
- 6:08and they had a concept called tight providers.
- 6:10You could write F sharp scripts that were then instrumenting our
- 6:14code and you could pretty much M access the same object in
- 6:18there's when you could exchange objects in between each other
- 6:21but it all compiled down to the the same stuff that's your
- 6:25Sharpie on the compiles down to. So, and what we ended up doing
- 6:28is, we were writing our training Pipelines, In our and then we
- 6:31had an F sharp script that was instrumenting, the our scripts
- 6:35to run all the training codes. And then we were pretty much
- 6:39inspecting. So that point there was like an
- 6:41extra boost kind of type of model and and we were extracting
- 6:49the the different weights of the different trees.
- 6:52More as many early out there pickled these these trees as an
- 6:55F, sharp object and then re-implemented the, the
- 6:57inference code in F sharp. In order to get some kind of
- 7:02model into production so it's been quite a quite a long time
- 7:07to and since since then and I think the community has come
- 7:11quite a long way and but there are some sorry.
- 7:14Go ahead. I expected that I thought I'll
- 7:16probably still quite valuable. So what I thought was
- 7:18interesting specifically for for that time is that and the whole
- 7:22pipeline actually was automated, right?
- 7:27So, and everything that needed to be done was running this
- 7:30Shop. Stripped, she could even
- 7:31schedule and then the whole like and catching a data set from the
- 7:35data warehouse running the whole training code, creating this
- 7:37Picard file and deploying that into what I did Point ended up
- 7:41being a c-sharp library. Was all automated which I
- 7:44thought was pretty cool. And yeah, on the, the data
- 7:49pipelines, it was kind of interesting in the sense that
- 7:51the the contract to The Wider company.
- 7:57It's pretty much the C sharp interface so they That is like a
- 8:01huge object over and then we use that to extract features and put
- 8:06that into into our model scoring code.
- 8:09And do you feel there's like was there a lot of Technology
- 8:14boundaries at this point or was it mainly just the organization
- 8:19itself? What do you think were some
- 8:21hiccups that you were running into as you were trying to make
- 8:25things better? And so I think a lot of The so I
- 8:30think I technology, I honestly don't have a good idea of when
- 8:34technology turn up. So I'm always not entirely sure
- 8:37whether it's just, we were lacking knowledge about it or
- 8:38the technology just wasn't there, but definitely, we
- 8:41weren't aware of. I think the options that are
- 8:44that are out there today, so we just try to figure it out and
- 8:49ourselves and I think a lot of the issues and I think that's
- 8:53something that I think in all of technology is, is the case where
- 8:58more organizational boundaries, Than there were necessarily and
- 9:02technical issues. So if you look at and
- 9:05specifically the and the data pipelines, right?
- 9:08So the back end was then handing us over this like a data object
- 9:12and where we extracted our feature salt so what that meant
- 9:16was it was a huge pain to add an additional data sources and into
- 9:20our model because then we need to what maybe we managed to get
- 9:23it, get the data through some kind of batch process that was
- 9:27available in the data warehouse. And we managed to train our
- 9:31model based on the new data but then we needed to somehow
- 9:34actually get that into into the the other pipeline as well.
- 9:39So the backend handing over that the data object and that has
- 9:44been a very painful process, primarily not so much because of
- 9:48technological restrictions by much more because organization
- 9:51need the data team has been quite quite separate from the
- 9:55back-end team and trying to get stories into into there.
- 9:59Into their system has been like quite quite difficult outside.
- 10:02And I think that's something that I still see today where
- 10:06it's very hard to convince other teams to expose some kind of
- 10:10data that you will need or to get them to fetch some data
- 10:15that's not like directly relevant for them or not.
- 10:18They're relating to to some kind of use case.
- 10:21Yeah, that's something we hear all the time on here and in so
- 10:25many guests have come on and said, ml Ops is an Additional
- 10:29problem. It's not a technology problem
- 10:32and you can have all the tools you want.
- 10:35But if you run into problems like you encountered there or if
- 10:40you're working on an old structure or whatever it is that
- 10:45the organization is not allowing you to have the real data,
- 10:49they're giving you replicas of the data and it doesn't give you
- 10:52a replica of the full data sets. You're looking at an
- 10:55organizational problem, you're not looking at a technological
- 10:58problem. So that's super interesting to
- 11:00hear and just confirm what what everyone else has been saying
- 11:06any other learnings that you got from, from that job that you
- 11:10want to pass along to us. And yeah, I think like speak.
- 11:16I mean, in the end it comes down to the organizational problems
- 11:19as well. But that also meant that was a
- 11:21huge pain to actually test the, the feature pipelines.
- 11:24So while it was like and technologically demanding to get
- 11:27the model into, To production. Like you could actually are
- 11:31quite neatly test and what was going on.
- 11:33So you can pretty much generate some test data and see whether
- 11:36both implementation were returning the same thing.
- 11:38Doing the same thing for the, for the features, what huge be
- 11:41painful. Like, I don't think we ever
- 11:43really managed to do it and that architecture, just because there
- 11:48was some data in databases which we could see and then the
- 11:50application code was doing some magic and then in the other at
- 11:53the other side we were getting some data back.
- 11:56So that was it was well Quite interesting learning that
- 12:01influence like later decisions that we drew.
- 12:03Yeah. And that's interesting.
- 12:05And you were saying you were doing our batch at that point
- 12:07right. So the training data generation
- 12:09was batch but then the in life inference it was a library that
- 12:14we gave to our back-end team and they were then on there and
- 12:17compiling some data then we were doing like additional
- 12:20transformation on our end against it and which then ended
- 12:23up with the like huge feature Vector, actually, even that
- 12:25time, that was like, quite usual I can remember 160 or so, did we
- 12:28had a bit? Oh yeah.
- 12:31That sounds like fun and let us know in the chat if anyone has
- 12:35worked with F-sharp because that also sounds like a lot of fun to
- 12:40work with. So now then you graduated from
- 12:44that job, right? You decided.
- 12:46All right, I'm going to move on to bigger and better things and
- 12:50we'll go into face to what exactly was happening there at
- 12:55this second job? Yes.
- 12:57The second thing I want to talk about And it was quite
- 13:00interesting because when I came there were some things I think
- 13:03we're quite nice and but some things will also like really
- 13:07really terrible even worse than the first one.
- 13:10And so what was nice is they had their own like a python
- 13:13microservice in order to and to do the, do the predictions and,
- 13:19and also the the whole model deployment with that was also
- 13:22quite a lot easier. So if you're using the same
- 13:24language, it was very very simple at that point.
- 13:28But we also had terrible issues in terms of the data
- 13:31acquisition. So what they were doing is they
- 13:32were running, they were writing SQL, queries, and stored
- 13:35procedures in like in reach replicas of some kind of
- 13:38back-end database. In order to create the, the
- 13:41feature vectors it was incredibly slow.
- 13:44So it took like minutes to create features which like it's
- 13:49really not acceptable and but there are some interesting
- 13:53aspects of that as well. So what they did is they they
- 13:57happy SQL queries, that the road creating inference and features.
- 14:02And then the they parameterised, the SQL queries by pretty much
- 14:07injecting like ideas and time stamps to create the historical
- 14:12data set. So while I think like from a
- 14:14kind of computational efficiency standpoint and from a like,
- 14:17separation of concerns then point and was really terrible.
- 14:20But what was very interesting in in there is that pretty much
- 14:24agree using the same code in order to To generate your
- 14:28training data sets and generating your your inference
- 14:34coat. I thought that was like a very
- 14:36interesting idea and something that we try to do to keep also
- 14:41afterwards so we later on underwent a proper separation so
- 14:46all of that was was killed and we started adopting the back and
- 14:51specifically was starting to use and domain-driven design and
- 14:54they started to communicate through events with each other
- 14:57and then so We managed to migrate all of that to an event
- 15:01driven design and that actually worked worked quite well where
- 15:04we could, like, have the same idea of having, like local
- 15:08projections in that case against the events and then generate our
- 15:13training data and by a pretty much doing the same thing of
- 15:19creating some kind of transformations of historical
- 15:22events. Not only of the events that are
- 15:24currently there. And was that how you did?
- 15:27You eventually cut? On the time that it took.
- 15:31Yeah, we did. So in the end it was, I mean in
- 15:34the end it wasn't really significant because we pre
- 15:37calculated everything. So the actual time was like,
- 15:43less than 100 milliseconds but also that, that wasn't isn't
- 15:47quite true. In the sense that we pre
- 15:50calculus because it was event-driven, we managed to pre
- 15:52calculate everything and when it was needed it was just to look
- 15:55up in a database. So there wasn't anything
- 15:57happening there. Okay.
- 15:59And for those of us that are a little bit foggy on the
- 16:05terminology of Transformations, keep break down, what that is
- 16:08and why it's important. Sure, what is the
- 16:14transformation. So and you have like some kind
- 16:19of raw data which can really be be anything.
- 16:22So can we I think, what when we looked at it was mostly like
- 16:25some kind of Json documents so say like You buy a credit report
- 16:29which nowadays comes in terms of for Jason, you get some data on
- 16:35like what are crime rates in a particular area?
- 16:37You get some data on what other things was there.
- 16:42Like I'm like some kind of risk in is that is associated with
- 16:46like an email address or something this and usually some
- 16:49kind of Jason and then you would want to extract turn that into
- 16:53numerical values that you could use.
- 16:55So that could be just extracting like a value.
- 16:58From a lack of credit report. It could also be things like
- 17:04what was the difference between events that were happening to
- 17:07hold on? Whom did whatever Lex particular
- 17:09screen take and or yeah any kind of like at that time we didn't.
- 17:18But you can also use like some kind of a vectorization
- 17:23techniques to extract data from yeah, like natural.
- 17:28Just so you really try to to turn raw data sources that you
- 17:32have available into something that is available as input to
- 17:36the machine learning model. Okay?
- 17:39Yeah. And that was basically my next
- 17:41question was why this is important for the model and why
- 17:46it needs these transformations to happen?
- 17:50Well, it depends a little bit on what your notion is of model,
- 17:54but the, the classical version pretty much takes and numerical
- 17:59values as inputs. And with that idea, you pretty
- 18:07much have to ensure that all the like what's usually text Fields
- 18:11gets and then somehow recorded into numerical values.
- 18:15Perfect. Perfect.
- 18:17So I've been listening to everyone's feedback in the
- 18:21community, I just wrote a ask people to fill out a form on
- 18:26what we've been doing good and what we've been doing, we would
- 18:30like to see us do more of, and some people said, break it down
- 18:33real slow. So I'm trying to listen people,
- 18:36I'm trying to get it broken down in a way that everyone from the
- 18:41newbies to the expert. People can do it and they also,
- 18:46Asked for Q&A sessions. So just in case you don't know,
- 18:51feel free to throw any questions of yours into the chat section
- 18:57or there's an actual Q&A. That is there.
- 19:00And we will try and get to them as fast as we can.
- 19:04So, moving along, you did that. Did you feel like there was a
- 19:08graduation of sorts from your first job to the second job and
- 19:13what were some key things like actually.
- 19:16I think what I'm most interested in is what are some things that
- 19:20you're like? I'm never going to do that again
- 19:25- mm. I think this whole idea unlike
- 19:28and having like SQL queries, run against operational.
- 19:33Databases is or at least. And this like feature
- 19:38calculation and against operational database is really
- 19:42horrible one that I've never want to repeat in my life again.
- 19:46When those come to a lot of headaches boss from
- 19:50computational point of view but also from just separating out
- 19:54contracts. So there was also pretty much
- 19:58the backend couldn't change their database without breaking
- 20:01our code, which is really horrible.
- 20:03Hmm, and so that's a definite learning.
- 20:07I think I learned a lot of team composition so we discussed
- 20:14already a lot of Williston Issue where we are now, I think
- 20:18drawing the line between like, we're back and starts and where
- 20:20data starts where they has a like wider scope.
- 20:25I think we're, where do you feel like that?
- 20:29Is because that is something that we talked about a lot and
- 20:34the idea of one person being able to run the whole Spectrum
- 20:38or an ml Ops engineer really. For me, I'm not sold on that
- 20:43idea yet. Like that shouldn't be just one
- 20:46person. His job.
- 20:47So how did you see things more clearly?
- 20:52So I mean ideally, you have this one person who can do
- 20:56everything, right? But I think it's just extremely
- 20:59hard to find these people. So I think what, what usually
- 21:03works much better is and just trying to build teams that like
- 21:08have very diverse skill sets. So where we now, have
- 21:11application engineer State engineers and the scientists
- 21:14grouped together in teams And so that there's much much better
- 21:19and communication between them and then, yeah, like trying to
- 21:25do like the end product that these people are supposed to
- 21:27produce is a service that is running in production and that
- 21:33service is not supposed to take like a lot of data directly but
- 21:37is supposed to pretty much taken an idea and then return like
- 21:41some kind of prediction. Let the whole data pipeline in
- 21:44your how do we get the data is the data?
- 21:46Actually of good quality. And so on is always in the
- 21:48control of the team and because in the end that is what makes
- 21:53the team successful, right? So if some some other team is
- 21:56has ownership of a data Pipeline and then breaks like it
- 22:01influences the performance of some other team which is really
- 22:04not. Okay.
- 22:05Right. So then let's a team can't
- 22:07directly succeed just because there's there's some external
- 22:10dependency and I mean in any organization you never get used
- 22:14to perfect but we Try to at least an integrate all of them
- 22:18into one team, that's awesome to hear that.
- 22:22And that's a great explanation to, and that's something I guess
- 22:27for another day. And another topic that is when a
- 22:31model breaks and it's out in production, who owns that.
- 22:36So, the, the next question I guess, or the natural
- 22:42progression of this is going to be that you I moved on from that
- 22:47job and you landed at where you are now at tide?
- 22:51Is that correct? Yes.
- 22:52So the the last team thing was actually referring to tight
- 22:55already. So okay, and ice.
- 23:00But yes, and so at that point it was kind of interesting in the
- 23:02sense that we were like creating a lot of teams and quite like a
- 23:06high pace. And there were a lot of like
- 23:09issues arising from that. But what are we trying?
- 23:16To do different this time. So I think the first thing is we
- 23:21are trying to really stick to the event driven design.
- 23:24I think that was a very good design decision so where we are
- 23:29aiming to create a lot of the features that we use for machine
- 23:35learning models based on the events that are somewhere
- 23:37created in our back end. And then also, as much as
- 23:40possible at least use that in order to build our historical
- 23:45training data sets. And the special thing you learn.
- 23:48Sorry to interrupt. This was something you learned
- 23:50at the last job. Yes.
- 23:52So I think but I think we scaled it up quite significantly so in
- 23:57the, the the first one we only and so a lot of it went through
- 24:07through one model and we're here, we are reusing features
- 24:11across different models, which is I think, like, That we
- 24:17previously haven't explored as much.
- 24:19And and we also started doing that like, using the data
- 24:27warehouse as a as a primary data source.
- 24:31So, in the previous companies and that wasn't really possible
- 24:35because it was pretty much a new company comes in and we needed
- 24:39to find like some kind of score against them.
- 24:41Whereas here we also have at least number of applications
- 24:45where there's a lot of information.
- 24:46Nation, which doesn't really need to be fresh.
- 24:48So we tried to join these two together, that makes sense.
- 24:54Yeah, yeah. That makes total sense.
- 24:57So we're getting a question coming through in the chat and
- 25:00it's Arizona, is asking, have you only worked with teams with
- 25:04one programming, language? They're saying there's has three
- 25:10and two that are not Python, and it's difficult.
- 25:16It challenge to say, the least, for the ml Ops engineer on that,
- 25:21was that every your case, I mean, I know that on your first
- 25:24job you were working with r and C sharp, right?
- 25:28Yeah. So and one of the nice things
- 25:31is, since we started the team from scratch, we could
- 25:34standardize on python which was very nice on the first job.
- 25:37It was and C sharp. In the second one, the back end
- 25:40was written in Ruby and we had our own Services there and in
- 25:43the third, in our back end is written in Java.
- 25:48Yeah it is a pain, right? So what can you say and the the
- 25:54only things that I think I think at some point you just need to
- 25:59have some kind of obstruction against the microservice.
- 26:02So there are already an like tools out there.
- 26:05Such as Sage makers that make it reasonably, easy nowadays to
- 26:09just spin up an API against some kind of model, but I feel trying
- 26:15to do To translate chords directly is is a very painful
- 26:23undertaking. If there are like
- 26:25implementations of the same like sometimes it works out.
- 26:27Sometimes you have implementations of the same
- 26:30libraries in multiple languages in which case the Handover isn't
- 26:33terrible. But personally, I found it much
- 26:35much easier to just have some kind of API extraction in
- 26:38realize, doesn't really matter what the languages are.
- 26:41Yeah. Yeah.
- 26:43And that, I mean, we see a lot of Of these days.
- 26:47I feel like in software engineering it's not so much a
- 26:51language thing as much. I mean, I see another question
- 26:54coming through in the chat. That's asking what's your
- 26:58language of choice in ml Ops So yeah, I think like for the, the
- 27:05actual Services Python and then for anything where you actually
- 27:08are feel like high data volumes, its Sparkle pie spark.
- 27:14Okay. Nice.
- 27:16All right, let's keep moving. Let's stay on tied for a little
- 27:19bit because I know you've got a lot of cool stuff going on
- 27:22there. Maybe it would be worth you
- 27:24telling us what exactly is going on at tied?
- 27:29What are your use cases? And why is it?
- 27:32It that like how has this reusing of features with
- 27:35different models? Enabled, these use cases, Sure.
- 27:41So the ones that spring to - we there a lot of risk related
- 27:44ones. So, and trying to assess the
- 27:50risk of onboarding to fraud risk, credit risk, invoice, and
- 27:53default risk these kinds of things.
- 27:56I think, one of the things that I thought was quite quite
- 27:58interesting, is we also have a model that tries to match
- 28:06invoices to transactions. So whenever you And you do a new
- 28:11trend Trend, whenever you have an invoice race against the
- 28:15company, you would like to know whether this invoice is getting
- 28:18paid. So we are trying to figure out
- 28:20for every new transaction that comes in.
- 28:21Like, is there a particular invoice that actually pays off
- 28:24that transaction or is being paid off by their transaction?
- 28:29And in order to help pretty much smes to?
- 28:35Yeah. Reduce the, the manual override
- 28:37the manual admin by not having to do that.
- 28:39Themselves. And I think, the what we've seen
- 28:44is that specifically in the, the risk cases, but interestingly
- 28:46also, for the invoice and matching one, there were a
- 28:54number of features of yet, like, Risk related ones, that could be
- 29:00reused. So things such as like invoicing
- 29:05patterns or never some transaction patterns that
- 29:11Identify the source case. Well then we could actually use
- 29:14in different models as well. And I think what, what is
- 29:20probably worth mentioning there is in terms of the the feature
- 29:24pipelines, one of the things that we did what we started off
- 29:28building ourselves but then in the end, when for commercial
- 29:31provider is and building up some kind of feature store.
- 29:35So we like, as I think, I said previously, the event room
- 29:40approach was useful for building our own pipelines and keeping
- 29:44the managed but it's actually It even more useful to, to store
- 29:49them in some kind of database that can be easily accessed.
- 29:54And the reason for that is a lot of is computationally.
- 29:57So you want to know, you don't want to do all your feature
- 30:01calculations at the point when you want to make a prediction,
- 30:04but you do want to do that before and then also you would
- 30:08like to. Yeah.
- 30:12Fetch. Like they all might have been a
- 30:14different point. Sometimes you ideally want to
- 30:16standardize on Some particular point in time as well.
- 30:19Yeah, future stores are such a buzzword right now in the
- 30:24community. I mean, it's not a day that goes
- 30:28by that. We don't talk about him.
- 30:30I just actually put a video on feature, stores up on LinkedIn,
- 30:33because we made some animation videos.
- 30:36And I feel like that was the biggest buzz word that along
- 30:40with maybe monitoring, which is personally, my favorite because
- 30:45it's such a difficult problem to attack and what do you Monitor
- 30:48and and how? And And how do you make sure
- 30:50you're not getting alerts 24/7. But feature stores are are also
- 30:54right up there. It's one of the most talked
- 30:57about things in the community so what made you I am interested to
- 31:02know like did you try any open source Solutions?
- 31:05Or did you just go right out and buy it?
- 31:08So we initially and we initially actually started building our
- 31:13own but it was actually taking significant time to to scale up.
- 31:19And we briefly looked at some open source Solutions.
- 31:23And the problem with that is that I think the the scope of
- 31:27them were slightly different. And so, I think a lot of the
- 31:31open source ones are more like feature, Registries where your,
- 31:35her really have to have pre-calculated and your
- 31:38features, and then you could register them both in some kind
- 31:41of like historical database or some kind of real-time database.
- 31:46But what we really wanted to Surf, like some kind of easy way
- 31:48of generating new features and that you could then use for.
- 31:55Yeah, real time. And as well, for the training
- 31:58data generation. So for some kind of batch
- 32:00process. So we in the end when for
- 32:03product called tacked on that was quite, there was doing that
- 32:07out of the box. Also quite new at that time and
- 32:10we've been quite quite happy with that decision in particular
- 32:13in the sense that it A and reduce the time that we spend on
- 32:19generating additional features significantly and then also
- 32:24quite interestingly, we see that a lot of the work on generating
- 32:28features, even for real-time applications, actually, we the
- 32:32data scientists were able to do themselves to speaking.
- 32:34Again, of the organizational challenges that previously has
- 32:39been done by the engineering team at now, could be done by
- 32:41the the data teams for all the data science team.
- 32:45Oh, that's yeah, that's a nice benefit that I hadn't even
- 32:48thought of. And so when you're looking at
- 32:52your different pipelines and you're looking at your future
- 32:53pipelines, how do you decide on which pipelines are going to be
- 32:58batch? And which ones are streaming?
- 33:00And maybe we should preface this by asking you, what does Real
- 33:06Time mean to you? Because I've had a few people on
- 33:10here and they say, yeah, real time I was talking to somebody
- 33:13and they said, oh yeah, we need everything.
- 33:15Real time. And then real time to them meant
- 33:18they needed everything once a month and so it was a ridiculous
- 33:24when they looked at him like, that's real time, what that
- 33:26doesn't mean? So what is real time for you?
- 33:29How much latency is there? Or how much time do you need?
- 33:35What does that mean to you? So it varies a bit from
- 33:39application to application, but I would generally think that
- 33:44everything less than is Second I would consider real time and
- 33:47everything above a second. I would consider near real-time.
- 33:51Okay? So there are some applications
- 33:53where we actually have how or use cases, where we have hard to
- 33:56deadlines. Most notably transaction
- 33:58monitoring where and there's an external party doing an API
- 34:02call. And we need to come back and say
- 34:03like this is transaction, okay. Or not within 500 milliseconds.
- 34:08And a lot of the like even structured streaming or some
- 34:13doesn't really like work for that properly.
- 34:16So you need to get in some way, pre calculate the features for
- 34:20for these applications and then have a reasonably lightweight
- 34:23process to update that with the information that actually comes
- 34:27from the, the transaction itself, which is the new piece
- 34:29of information. Yeah, totally.
- 34:31So so then it's only when you really need to do it because of
- 34:38some third party that you do the real-time and the rest is bad or
- 34:43near real-time. Or is there certain like because
- 34:47I've heard that it's always easier to do batch.
- 34:51I don't know. You can tell me if that's right
- 34:54or how you feel about it. And I think it's simpler to to
- 35:00reason about and for the most part and oftentimes and like,
- 35:07this isn't always true, but oftentimes badge,
- 35:09Transformations are stateless. So you have just like some kind
- 35:14of piece of data, and then you do some kind of transformation
- 35:16and you end up with the the new piece of data and having state
- 35:19is, Transformations is very simple to reason about.
- 35:23Whereas, if you have like some kind of event driven system, you
- 35:25have all these questions of law, It's conditions.
- 35:27And what happens if one event happens before the other event?
- 35:30And then we need to keep track of state and so on, which makes
- 35:32things like reasonably complicated, I think.
- 35:36And so in terms of like how do we decide.
- 35:41So I think in general everything that works through batch, we try
- 35:45to do through match, but if it doesn't work then, yeah, I mean,
- 35:49it doesn't work, it's more use case related really than it is
- 35:52anything else. and so I'm just thinking like, when you're
- 35:57building these real-time distributed feature pipelines at
- 36:03scale and you encounter failures How do you deal with that?
- 36:11I mean, when you say failures, you mean technical failures or
- 36:16you mean like that? Yeah.
- 36:17Like mainly a failure with like the pipeline and or anything.
- 36:22Yeah. Technical failure that you maybe
- 36:26you got to find a bug and you're not really sure where that bug
- 36:30is or you have to go and be a detective and find where it's
- 36:34coming from. and, So yeah, okay, so if there's an extra so we
- 36:42have an we have Engineers on call that would generally
- 36:48investigate that and as you say, it can be, quite quite confusing
- 36:52to understand where the, the error actually, Originators and
- 37:00in the end, we are trying to lock the different parts and
- 37:07between our are transformations. Yeah.
- 37:09So again, one of the nice things about the event room design is
- 37:13that you can actually look very clearly at the inputs to your
- 37:16functions and it doesn't always work because sometimes the the
- 37:21local state might be updated in there might be some kind of
- 37:24weird inference. But yeah.
- 37:27And so as you're looking at, like going back to the feature
- 37:31store bit, let what stage did you realize or did you want to
- 37:37actually get a feature story? Or was it something that you
- 37:40came into tied with or was it once you realized?
- 37:44Okay, we're going to go with this event, div driven design.
- 37:47And the best way to do that that we can see of right now is this
- 37:52thing called the feature store. And so, I think that will
- 37:54multiple reasons, so one of them was strategic where we are
- 38:00trying to in the end, automate every decision within tight.
- 38:05And I think the, the way this would work is by reducing the
- 38:09Cost per model and with that the cost per feature as much as
- 38:12possible. And and that I thought, if you
- 38:18look at the cost per model, really a lot of the time goes
- 38:21into building the data pipelines.
- 38:24So trying to reduce that I thought and we would need to
- 38:28have like some kind of yeah feature store solution and Which
- 38:35was the primary motivation and that point makes sense.
- 38:41And yet, I think it's, I'm still quite quite happy that we went
- 38:45down that road. Mmm.
- 38:47So then when your, because you've been through these three
- 38:51stages and have a look at them in, it's like, roof you were in
- 38:56the trenches for a while and as you can recommend to others.
- 39:01Now, going through this and seeing these different styles or
- 39:06maturity levels of feature pipelines, do you feel that?
- 39:11That it's like, how would you recommend when to get a feature
- 39:15store or what to do with that? That whole concept because it is
- 39:21such a hyped up item right now, right?
- 39:25And so, I think it's easy for a lot of people to say, oh well, I
- 39:29just need a feature store and then you add.
- 39:32I saw someone in the community, drawing a diagram of the Google
- 39:37maturity level 2 and then adding all these Tools, that would be
- 39:43each piece and if you don't know what what I'm talking about,
- 39:46Google put out a paper and given different maturity levels and
- 39:50basically how automated your machine Learning System is.
- 39:54And they put in the community. This person put this diagram
- 40:00with all these different pieces and what they were going to do
- 40:03and I was looking at it like wow.
- 40:06That's amazing. Good luck.
- 40:08How much of this do you already have in place?
- 40:11Right? Because it could be crazy to
- 40:13setup and especially if it's a small team it could be very
- 40:17difficult and take a lot of time.
- 40:19So I guess the real question here is you with all your wisdom
- 40:25what would you recommend from a maturity standpoint?
- 40:28When is that Breaking Point like you should go out and get a
- 40:31feature store? So I think the question is gold
- 40:35and get a feature store. So I think like as an
- 40:39organization you should try to get to A feature store, but that
- 40:42can mean very simple things, right?
- 40:44It can mean, just having a process of where you create
- 40:47tables in your, in your data warehouse, then have a certain
- 40:51structure that makes it very easy to extract feature values.
- 40:56I think like looking into commercial like solutions to me,
- 41:00I think the the only real purpose that is if you need to
- 41:05somehow calculate features in real time.
- 41:07So if if it's not okay for you to have freshness of features
- 41:12that that your data warehouse, can't come facilitate.
- 41:19And that to me I think would be the boundary of when you would
- 41:23move to to some kind of commercial solution.
- 41:25Mmm, so it's really for me around like a freshness
- 41:29requirements. Yeah, yeah.
- 41:31That's a great answer. And so as you're looking at like
- 41:35the feature store, can you summarize like some of the
- 41:39greatest problems that the feature store solves for you?
- 41:44So I think it's and well reducing the effort that goes
- 41:49into creating a feature and putting it into production.
- 41:53So reducing the cost per feature and that sense and also reducing
- 41:59a hand over our requirements. So I think said earlier as well
- 42:03that and now a data scientist can create a features themselves
- 42:07rather than having to rely on data engineers.
- 42:11And I think there's also a mano During a is much easier.
- 42:15If there's one system through which, all your features go and
- 42:21basic stuff out of there as well.
- 42:23Yeah, that that is also another big thing monitoring that and I
- 42:28know that is that is huge, a huge piece of it.
- 42:33And then there's a great question in the chat that just
- 42:36popped up. It's what problems does a
- 42:38feature story introduce if any and so I mean with any
- 42:44additional piece of your stack, you are adding an additional
- 42:49complexity. So, and I think there's a piece
- 42:54on like your in a way and tightly coupling like a lot of
- 43:01your Production Services to one particular pipeline, right?
- 43:04So in theory of one of these pipelines would go down then
- 43:07would create quite a lot of like Downstream impact and then
- 43:11they're kind of like subtle iterations on that point as
- 43:13well. So specifically, like versioning
- 43:17is kind of, like somewhat painful or features where well
- 43:21it's not like they actually like process solutions to that as
- 43:24well. But you need to at least think
- 43:25about it. And where And if you like want
- 43:29to make a change to a feature, then you can't just make a
- 43:32change to the Future out because that would like create like
- 43:35create a different distribution of the future with then would
- 43:38mean that your models are not adequate anymore.
- 43:41So like and that I think becomes a little bit more difficult, but
- 43:47I think the solution is also not particularly difficult in the
- 43:50sense that you just don't do it, right?
- 43:51You just write new features for every for every iteration, but
- 43:54it is something that that needs to be actively managed.
- 43:58And and create some danger in that sense as well.
- 44:00Yeah, if people don't follow process.
- 44:03Yeah, the tightly coupling is, when you talk to Engineers about
- 44:07that, they go and so I've got a great question from David here
- 44:15in the chat and this one's going to make me David, you're gonna
- 44:19make me read a little bit, huh? So, how did you approach Dynamic
- 44:23features like rolling? And there's a lot of acronyms in
- 44:26here, like, In ew, ma there's probably a special word for that
- 44:31which I don't know, dwma online filters or even RN.
- 44:38N type models as features and I am thinking about features that
- 44:44you will not store permanently in a feature store and might
- 44:47involve some State like in a rolling mean or RNN embedding.
- 44:53I guess I'm asking about, where does the model end?
- 44:58And the feature start from the perspective of the system and
- 45:01the engineering as a great question.
- 45:04Yeah. And I don't have a Your Grace
- 45:09great answer to that and It depends, right?
- 45:16And so if you think that these, so I guess in the end, what what
- 45:21the this question comes down to is that what has become like
- 45:25common practice I would say, is that this kind of stacking of
- 45:28models, right? So, the output of one model is
- 45:30the input of the kind of the next model.
- 45:32So that's it. So in some sense that means that
- 45:35the output of one model is also again a feature.
- 45:38And it's really a kind of, like a design decision, right?
- 45:42So if you, if you think that this feature will be likely
- 45:46reused, then bye-bye other things, and then maybe it makes
- 45:51more sense to, again, put it into the feature store.
- 45:54So it might be reused by other stuff as well.
- 45:57And it also depends on how your training is set up, right?
- 46:00If you're trying to train, like if your whole training pipeline
- 46:05is pretty much training the first Model.
- 46:07And then the second model on top, then probably it makes
- 46:10sense to not have it in the future store but having more
- 46:12closer to your your model. And if you do that, by the way,
- 46:18then you have this thing that your features are not strictly
- 46:21numerical anymore. But you also have like other
- 46:23feature types, which again, is not really a problem but you
- 46:27just need to think about them. It can have different types as
- 46:29well and so, I don't know if it's not really an answer, but
- 46:32it's more David or let us know in the chat if that was at a
- 46:37quitter. Not so another great one.
- 46:41How many features does the input data have prior to the store in
- 46:45an individual industrial setting?
- 46:48You might have several hundred features already.
- 46:50So what a feature store their serve more to highlight, what
- 46:55seems important? I'm not entirely sure I get the
- 46:59question to me to me Frank. So how many features does the
- 47:02input, the idea to have prior to this?
- 47:05Door depending on which store you use, either.
- 47:10It's already pre-calculated as feature.
- 47:12So it's just the same number like you can, you can have
- 47:14different processes pushing in different features, right?
- 47:17But it would just be the same if you're using similar to what we
- 47:20are using where the calculation or the transformation happens.
- 47:24And as part of the future store, then the input data doesn't have
- 47:27any features, right? So you just ingest raw data and
- 47:30transform it into features. And then the second question.
- 47:34So in an industrial setting you might have several hundred
- 47:37features already. So what if feature store their
- 47:40serve more to highlight what seems important and So, if
- 47:47features, so one of the nice things that you often times get
- 47:51like basic documentation with that as well.
- 47:53So you can actually not only see like what features does your
- 47:57organization have. So the discovery piece but you
- 47:59can also see what does it actually mean?
- 48:01And not, not yet, but maybe it might even make sense to have a
- 48:06like, very clear understanding of where it was, particularly
- 48:08useful as well, mapping in this, this additional metadata.
- 48:16But yeah. So the the documentation, peace
- 48:18and Discovery peace is something that I would see as part of a
- 48:23feature store as well. I, I just remember that I
- 48:30interviewed Kevin the CTO of tecton in June last year and I
- 48:36asked him. Hey, do you have any like badges
- 48:40for people who create the feature that cost the most money
- 48:44or the feature that is the most used or things like that?
- 48:49And he was like, no, we didn't do that.
- 48:51Dude, I don't think he thought that was something to spend time
- 48:55creating, but But I think that would be awesome.
- 48:57Imagine you could have a little little bit of challenge with
- 49:02your team to see who makes the best feature and who has to go
- 49:06stand in the corner because they created the most expensive
- 49:09feature. Yeah.
- 49:13So yeah, we're getting through. So, okay, to have a data store,
- 49:18you really need good data management and owners of the
- 49:21various features. I mean, I don't think it has to
- 49:24do with having a data store. But I think in Kind of like
- 49:27growing organization, you would need to have good data
- 49:31management and data owners as well.
- 49:35This is more really a problem of scale rather than technical
- 49:39issues and foods can can help with that, in the sense that all
- 49:45of that is in the end metadata, and you would want to have it
- 49:47all in one place. So, if you have a feature story,
- 49:51is very good, if you can pretty much see and at the same place
- 49:54where you can see the feature and the it is welded to find the
- 49:57feature or two metadata such as the description and an owner.
- 50:01And but yeah, I I think it's something that just comes with
- 50:09scale. Like you need to have like very
- 50:11clearly defined ownership of things, really, not only data
- 50:15and it's also just becomes impractical to to find the data
- 50:21that is relevant for you specifically if there's no like
- 50:26Discovery process flashtool. Yeah.
- 50:29Alright, last question for you, I am wondering oh, I just see
- 50:34another one came through in the chat.
- 50:35All right. Second to last question.
- 50:37Have you ever used or built any features doors that explicitly
- 50:40handle units and does dimensional analysis on derived
- 50:45features? I don't, I don't think that
- 50:49makes a lot of sense to me, to be completely Frank.
- 50:54And so the Okay, let me so personally, I don't think it
- 51:01makes a lot of sense because in the end, it goes into some kind
- 51:03of model and it should really be part of the model Pipeline and
- 51:06to standardize the future in whatever way they want.
- 51:10And what's interesting is, well, what is more important is that
- 51:14the training Pipeline and the, the inference pipeline have the
- 51:19same units? So are and that you ideally
- 51:24ensure by executing the same code in both areas, Has then it
- 51:29is to, to decide which unit is actually more important.
- 51:35It's also, it's also interesting actually with bucks, right?
- 51:37So if like, one of your if you have a buck in your training
- 51:40data Pipeline and in your inference pipeline, if it's the
- 51:43same buckets, probably actually, not that bad for the for the
- 51:45whole system because both of them are at least the same.
- 51:48It's probably not predictive or it might be predicted for some
- 51:51reason. Yeah, I like it.
- 51:57So now I want to jump on to the last question, which is how you
- 52:01deal with security and how do you navigate these security
- 52:06concerns as you're looking at feature Pipelines.
- 52:10And so in the end it's mostly access rights and that you can
- 52:17well at least the way we are currently doing it have for for
- 52:22certain features and yeah I think so.
- 52:28I think that security is quite a quite a wide topic is this
- 52:32related to like operation concerns or is it organizational
- 52:35would be able to get some more operational?
- 52:40and in this sense of I'm thinking more about like these
- 52:52data pipelines in this data coming through and how you're
- 52:57making sure. Yeah, there's the is there like
- 53:00our back and you're making sure the right people have access to
- 53:05this. Because I'm just remembering
- 53:07when you said on that first job that you were at and how you
- 53:12weren't getting access to the right data and that was an
- 53:15organizational problem. And then could that have been
- 53:20fixed, or has it been fixed now, where you're at and how have you
- 53:24dealt with that problem? Organizationally I guess. so
- 53:30that people are, okay, with giving you the data Okay so
- 53:36maybe a couple of things on that.
- 53:38So I think and we are currently hiring a better better
- 53:42governance manager. And what I think Miami General
- 53:46approach is and you can access most data as long as you somehow
- 53:53obscure it. And oftentimes, you can find
- 53:57some kind of way in which obscure data is still useful.
- 54:01In some sense, if you know, You're looking for and I think
- 54:07the the key there is more and getting ahead in terms of
- 54:11proactively, discussing with the, in our case of the
- 54:15compliance team like how you can actually do that rather than
- 54:21having them come in late. And then tell this is not, okay,
- 54:24this is not okay and so on because that everything you've
- 54:27been working on for the last couple weeks, just goes out the
- 54:30window. Yeah.
- 54:32So I think it's more like Proactively engaging in some
- 54:36kind of discussion with them and then finding some kind of
- 54:39compromise as well, where it's clearly, not okay?
- 54:42To like directly exposed some kind of like personal data, but
- 54:48you can usually obscured in some sense that you can use it.
- 54:53So, I lied, it looks like the people want a little bit more
- 54:57from you. If you have time, there is one
- 55:00last question in the chat. What kind of models do you have
- 55:04up? At the moment.
- 55:05And how do you test and monitor deploy the models?
- 55:11And so, this quite a lot of questions.
- 55:14So we have a variety. So from the traditional booster
- 55:19trees, some kind of neural networks, also have some
- 55:24semi-supervised and techniques as well.
- 55:29How do you test and monitor the climate models?
- 55:31So, testing, there are multiple steps.
- 55:33So the first one is After you write some kind of model testers
- 55:38unit test. Then there's also and
- 55:40distributional test is the accuracy am above a certain
- 55:44threshold and depending on, on the use case, or whether it's a
- 55:51high-risk use case or not, and we then either put the model
- 55:55directly into production in the early testing way, or if it's
- 55:58not, so if it's a high risk or sorry.
- 56:01Yeah. So if it's a high-risk used
- 56:02case, we then have something Which we call shadowing where we
- 56:06encourage much. Like if the there's a prediction
- 56:12requested we just lock what we would have done with the new
- 56:15model and then we analyze the distribution of the new model to
- 56:18understand whether it's it's accurate and or not.
- 56:25And and then in terms of how do we monitor deployed models?
- 56:29So specifically, I guess this is a distributional.
- 56:32So there we lock all Our predictions as well and then at
- 56:36the moment it's the we built a dashboard for every model so
- 56:41it's not. Yeah streamlined yet.
- 56:44But yeah. So we have like every prediction
- 56:50service creates events based on the predictions that have been
- 56:53done which are then end up through various processes in the
- 56:57in order to warehouse and we build some kind of dashboarding
- 57:00on top of that. Yeah.
- 57:03Which doesn't Happen automatically at the moment, but
- 57:06that's what we do. Awesome, thank you so much for
- 57:10coming and talking to us about this evolution of your ml Ops
- 57:14journey. I find it fascinating to see
- 57:17what you've gone through. And again, you were in the
- 57:20trenches. You were trying to iterate and
- 57:24just evolved this Evolution for me is incredible and really
- 57:28looking at the evolution of the feature pipelines.
- 57:31And then talking about the feature stores, which I A lot of
- 57:34people have lots of questions around because it is such a
- 57:39buzzword. It's been super insightful for
- 57:43me. I want to thank you again and
- 57:46everyone out there. If you're not in the slack, go
- 57:50ahead and jump in it. We will see you on there.
- 57:52If you want to continue the conversation, I know you're in
- 57:55it. So, if there's any questions
- 57:57that you didn't get to ask in this chat with Hendrick, then
- 58:03you can ask him on. Lack.
- 58:05All right. Y'all.
- 58:06Thanks again hendrik. Yeah, looking forward to hearing
- 58:09your questions.