Latest / Agentic Conversations (formally mlops.community) / Multilingual Programming and a Project Structure to Enable It // Rodolfo Núñez // MLOps Podcast #153
Transcript
- 0:00My name is Rolf on, yes, everybody calls me roll up and I
- 0:04work entailed. A telecom company as a senior,
- 0:08Emma loves engineer. And I do not drink coffee, but I
- 0:12really like to drink water and hot chocolate.
- 0:16Oh the project structure I think.
- 0:17I really like them which is the idea of automating things and
- 0:21stuff doing them over and over again iy talking to that project
- 0:24directly actually I wasn't living creepy as like.
- 0:28Give it to me. I'll see you.
- 0:30A few things. Yeah, maybe he can open source
- 0:33that, I would be really nice. What's going on everybody?
- 0:36This is your host Demetrios. And today, I am joined by none
- 0:39other than Abby. And today, we are also talking
- 0:43with Rollo who is what I would like to call a recovering data
- 0:46scientist. He has moved from being a senior
- 0:49data scientist, into being a, senior machine learning engineer
- 0:53at Intel, which is not the Intel that you probably think of, that
- 0:57makes the chips, its Intel, a Company out of Chile and they
- 1:01are doing telecommunications. So we talked all about different
- 1:07learnings that he has had going from being a data scientist into
- 1:11machine learning. It was B, should almost be
- 1:14titled what you need to know in ml Ops if you are a data
- 1:18scientist and he had a few hot takes, what do you think about
- 1:21this Abby? I felt like I did a creep at
- 1:26some of us takes know with all of them but I think something's
- 1:31worth reading twisting the one part about automating the
- 1:34workforce instead of doing the same thing over and over again.
- 1:37Even if it doesn't take a lot of time, but it is a blocker and
- 1:42the second thing which was about reproducibility and the kind of
- 1:46almost all CDs devil organization that they have with
- 1:49other projects. They're interesting.
- 1:52Onboarding process. They have Uber the bringing new
- 1:55hires so that they can teach the culture side of things.
- 1:58And the culture isn't hey, we need to have a copy every Friday
- 2:02and you need to say to nice things about your team members,
- 2:05the cultures, which is also nice culture, but that's not the key
- 2:09culture that we're talking about in this respect.
- 2:15You don't. Like if you don't like people,
- 2:18then that might not be the culture for you.
- 2:20Exactly. If what we're saying.
- 2:22But it is true that this type of culture that we're talking about
- 2:25with you need to do these things like this here is your cookie
- 2:29cutter template that you're going to use and you should know
- 2:35a few of the essentials as we called it.
- 2:37And we really jump off this conversation with the essentials
- 2:42which are data scientists and what they need to know to be
- 2:46dangerous Beyond just data science.
- 2:48I mean, obvious one, there is get the other one.
- 2:52One is just some kind of version control and it goes back to that
- 2:56reproducibility you were talking about.
- 2:58So I loved that. And then he talked about the
- 3:01clean code methods and how you need to be thinking about clean
- 3:05code, and he went into the two different camps of should you be
- 3:08commenting your code, or should you just should your functions
- 3:12be self-explanatory, or should your variables be
- 3:15self-explanatory? So you don't need to comment if
- 3:17I really meant to PT 3, we can comment the code automatically.
- 3:22There we go. So it's even easier.
- 3:24And now there's no excuse to not be commenting your code and
- 3:28having this clean code. And even I mean, what?
- 3:31G PT 3, I've seen some examples of people saying stream you
- 3:36know, update my code or make it better, right?
- 3:39What is it? Re-fracture my code and GPT 3
- 3:42will give that to you. So you it as a data scientist,
- 3:45if you are not feeling strong about your code just throw it
- 3:49into G PT 3. Hopefully, it's still free by
- 3:51the This episode comes out and you can refract your code and do
- 3:56not trust everything that it comes out with because I've seen
- 3:59too many outputs from GPT three that are absolute bullshit.
- 4:04That is a whole nother story for a whole nother podcast though
- 4:08March is sort of the time of release of the next Upp version.
- 4:11I'm not too sure if we this episode will be released by
- 4:15marshburn is going to be extremely.
- 4:18Oh, we'll see. We'll see how that goes.
- 4:21And we'll see you. If it has a little bit better,
- 4:23accuracy. So, as far as this conversation
- 4:27goes, Rollo was awesome, I really appreciated his Outlook
- 4:31and his views on things. Hope you do too.
- 4:34Before we jump into it. I would like to say that we have
- 4:38so much going on in the ml Ops community and so many people
- 4:41tell me that they do not realize all the cool stuff we have going
- 4:44on. So I'm just going to list a few
- 4:46things that we've got happening. You might want to check out the
- 4:50virtual meetups that go on on. Wednesday's every other week,
- 4:54all kinds of good stuff. And if you're a visual person
- 4:57and you like to see system diagrams, or if you like to do a
- 5:00little Hands-On workshops, we're doing them at the virtual,
- 5:03meetups Wednesdays at 6:00 CT. That is 9 a.m. in California,
- 5:08and I think it's 12 p.m. in New York and then we've also got
- 5:14three different emails that are happening.
- 5:16And we, I just started posting a ton on Tick Tock.
- 5:19So if you do the tick tock, think, um, And follow me over
- 5:22there. And last but not least, we've
- 5:25got a Blog and there's so many good things if you like to read
- 5:29and you're not into the boring blogs that had are talking about
- 5:35what is ml Ops and you want to go a little bit deeper.
- 5:38That is what our blog is for. Without further Ado, let's get
- 5:41into this conversation with robo.
- 5:50Let's just ease into it with this, all right?
- 5:52This is where we'll start. Let's ease into it with your,
- 5:56take on why data scientist should know how to code and code
- 6:01properly. But at the end of the day and
- 6:05data scientists are building software, very specific kind of
- 6:11software. It's a software that takes data
- 6:16transform data and output model or a Big turn or whatever it is,
- 6:22it's not always with material learning, sometimes it with
- 6:25other tools, but at the end of the day, you want to get a
- 6:29product out and it has to be useful for people, right?
- 6:34So if, if data scientists, do not know how to properly
- 6:40structure, and I mean the basics.
- 6:43I'm not, I'm not asking data scientist to be like, Pearls at
- 6:48coding. No, no.
- 6:50I mean, the basic, the very Basics.
- 6:52What are the basics? Get, ya give absolutely great.
- 6:55If data scientist is working without get I immediately, tell
- 7:01them, wait, not stop, stop right there in red flower using it, or
- 7:06maybe another tool, maybe, I don't know, SVN or Mercurial,
- 7:10although I think it is better. But what I mean, is, do you need
- 7:14to you, you need to be using Version Control of a good
- 7:19version control. Not at the an Title 1 and title
- 7:23to entice the tree. No.
- 7:26So that's the Step Zero. You need to be using gate or
- 7:30something like that. Another very basic point for me,
- 7:35is good naming of variables and functions and stuff like that
- 7:41because this is an. And now I'm going to talk about
- 7:46kind of two different schools. There are people Who usually say
- 7:51that you should comment everything on your code.
- 7:55So all are not not everything but a lot.
- 7:58So it is clear to other people who will then read your code to
- 8:02what you wanted to do, y etcetera.
- 8:06And there is another school that says you should not be
- 8:10commenting code because it should be self document.
- 8:14I'm more on the second school. I like to write code in Clean
- 8:20manner with a good with good names for variables, good names
- 8:26for functions. For example, I use for
- 8:30bullion's. I always use the prefix East or
- 8:36has or something like that. So, it is clear that it's a
- 8:40volume because you are basically asking a yes, or no question
- 8:44four variables, I tend to use kind of Not not too long
- 8:51variables, not to do name too but I don't use just the F, for
- 8:56example, for a data frame. I think people should name their
- 9:01objects, their classes, or whatever.
- 9:03They want. In a way that it makes it easier
- 9:08to understand when people are reading it.
- 9:11And no matter what, where you are reading.
- 9:14Because sometimes they do defined, let's say you define a
- 9:17data frame at the beginning of your code.
- 9:19And Then you use it in con, I don't know, 10 to 100 times
- 9:27during their whole code and you're using another data frame
- 9:32that you use in making half of that are Health those points.
- 9:38It's if you name, it data are DF and the other one data, it's
- 9:44very easy to mix up. So in general, I want to give
- 9:48data frames like Like last names or something like that.
- 9:52Like, dataframe, dataframe underscore role to to know that
- 9:57this is the first data frame that I read, I read or dataframe
- 10:01underscore missing values clean. So I don't have to explain to
- 10:07you who I did that because the name tells you, what is that?
- 10:12That way you can more easily, share your code to other people
- 10:18to other data. These two other ml UPS Engineers
- 10:23or to Forever. It's going to take that code and
- 10:27you can use it in any way. Yeah.
- 10:32Speaking by sharing, I have to give a shout out to will who won
- 10:38the greatest award and the ml Ops Community for 2022.
- 10:43It was the most cringe thread. And what he mentioned in this
- 10:48thread was that I just watched a data scientist copy and paste
- 10:53code from a notebook into vs code, save the file to disk and
- 10:59email it to us so we can put it into production while he's on
- 11:04vacation in Hawaii. That is a team player right
- 11:07there. That is a data scientist.
- 11:10That is the exact opposite of what you are asking for.
- 11:13And what I'm wondering is, how did we get to that?
- 11:15Like how does a person like that survive in the Workplace.
- 11:21Yeah, well, I mind is blown. You're speechless right now.
- 11:25You can't even think about it. Yeah, I have a, I have a
- 11:28strategy where I work. We usually hire a lot of Junior
- 11:36of data scientists. So most of them already come
- 11:41from. I don't know, school, maybe, or
- 11:43boot camps or whatever, and they are used to work on jupyter
- 11:48notebooks, or they don't know how How to use git or they just
- 11:52now get exist and that's all the debris basic.
- 11:56So, what we do at least and it's useful in, my opinion, is to
- 12:01have a very structured, our onboarding process everything,
- 12:06well documented, and at the very end of that onboarding process,
- 12:10we give them kind of an assignment.
- 12:14I need some standard brake. It's a depraved that every data
- 12:18scientist, that enters our team. Has to do it there.
- 12:22We kind of force them to use, good tools, we force them to
- 12:27use, get because they need to get the, the break with that.
- 12:30They need to create their own repo and push everything.
- 12:35At the end of the day, we want them to know the basics of get.
- 12:40Again, we don't want them to be processed.
- 12:43No, it's not necessary. We don't even talk about pull
- 12:46request or stuff like that. It is necessary.
- 12:50At the end, but we don't start with that.
- 12:54We just want to then to know the basics.
- 12:57And after that we give them a template for for projects, we
- 13:02developed in-house project template for data science
- 13:08projects, quite quite open. I mean quite General and I think
- 13:15every team should be doing something like that, everything
- 13:19should have a template. Already set up and it will
- 13:23depend on on the team. Some things will need more of
- 13:27some stuff and other teams will need other stuff, but you need
- 13:31to have a structure way to work together.
- 13:36So, and the people who join in the team, get easily kind of the
- 13:42culture of the team and kind, and they can adapt, and then
- 13:49they can easily share that. With more senior members, for
- 13:52example, under the into senior members can review that code and
- 13:57give feedback in a more streamline Runner interesting
- 14:02because this is something. Well, it's always talked about
- 14:07as one of the best practices, which is let's work with
- 14:09templates. And there's one very interesting
- 14:12template that is out there for their science projects, at least
- 14:15the one that I've been using, which is basically something
- 14:17called cookie cutter project. I don't know if you check that.
- 14:21But there are plenty of those, but one of the big differences
- 14:25is different companies have different stages of d&i, science
- 14:28projects and different team sizes as well.
- 14:31How do you make that distinction?
- 14:33As to, you know, not every data scientist is supposed to write
- 14:36production level code or not. Every code is supposed to be
- 14:40pushed into production. What's the distinction factor
- 14:43for you? Very you decide, this is where
- 14:45we spend a lot of effort on writing unit tests writing
- 14:48integration tests, and sort of Working with more of like an
- 14:52object-oriented design working more so with abstractions
- 14:56instead of encapsulations and all that stuff and where do you
- 15:00think about software design? And where is it a deer science
- 15:03project? Well at the end of the day, the
- 15:05final objective is to create something that is useful for the
- 15:10Enterprise for the market, so the answer should depend on
- 15:14that. Sometimes when we do things kind
- 15:18of too perfect we end up not Doing it because we take too
- 15:22long and doing and find it. And at the end, we don't finish
- 15:26anything. I think it's useful, it's very
- 15:29important to find the the balance there.
- 15:34Some projects can be much more easier to go than to put into
- 15:40production that they don't need to follow to strict standards.
- 15:44I still think we should follow kind of the basic standards
- 15:48which I already talked about. But in I think it's it in
- 15:54general it's not a problem to not work with glasses or stuff
- 15:59like that in most of the most of the projects that we developed
- 16:02on on my team. At least basically a series of
- 16:08scripts that at the end of the day produces an output, the
- 16:14objective is to take that output and put it into production, the
- 16:19way you do that. Not that important.
- 16:22As long as you manage to get that product out.
- 16:26So we don't always use classes. We don't always use oriented
- 16:30each object, programming, Etc. It will depend on what we need
- 16:36to do. If we need to maybe create a
- 16:39tool for others to use, then it could be more important because
- 16:44it has to be pretty General. It has to be useful for many
- 16:49other. People many other data
- 16:52scientists. For example, if we are creating
- 16:54attitude for data scientists to monitor their their models, it
- 17:01has to be well structure and maybe with a classes and
- 17:06everything like that but if you are just getting a score for out
- 17:11of a model and you want to score clients with that, it's not
- 17:15necessary really? You can just run a series of
- 17:18scripts in a certain order. And if they are well set
- 17:23documented and the Emma loves engineer who takes that can
- 17:29easily understand all of the steps and put that into
- 17:33production and get value out of that project so it will depend
- 17:38on on that. What's your final objective and
- 17:42do you really need to use more General programming?
- 17:49I see and also so one of the one of the things that you do talk
- 17:53about a lot especially I've seen in your LinkedIn post and some
- 17:56of your other comments has even three insert an ambassador for
- 18:00our markdown and quarter. So do you want to talk?
- 18:05You should we be using those over using?
- 18:07Let's say to protect folks that I started programming on vitamin
- 18:12A big at the beginning at the very beginning like kind of at
- 18:15school and then I switch to our when I started.
- 18:21Working then I was like working with both languages sometimes.
- 18:27So after working a lot with our analog, with our story, because
- 18:31if you are using our and you're not using our studio, you are,
- 18:35you're probably not doing it right because our study is kind
- 18:41of the best idea for our results.
- 18:45To the goal is pretty good, for general purpose also.
- 18:49So I tend to mix. Both of them.
- 18:51And then when I started working again, more in Python, I started
- 18:59noticing a lot of deficiencies on the basic jupyter notebook
- 19:04structure because I was constantly comparing it with our
- 19:09markdown or cuarto cuarto, see more new.
- 19:12So I was not comparing it to court at the beginning and but
- 19:17some of the pros that has Armor down and quarter which are very
- 19:23similar are that if you are not writing your output inside the
- 19:29same document that you are counting in for something to be
- 19:33the notebook, do right, do right?
- 19:36A cell you run those that sell you saved in the file and the
- 19:40output of that cell is automatically save inside that
- 19:45interactive, no, dude pack python file.
- 19:48So if you open that file with That text editor, you will see
- 19:52that at the end of the day, it's just, it's just a Json, Json
- 19:57file with a bunch of nonsense. Basically, when you save and
- 20:02upload an image, you hit had a bunch of nonsense because you
- 20:07are saving an image on a Json file.
- 20:09So you need to write a lot of random characters, kind of
- 20:13random to save that image. So the, the computer can
- 20:18interpret that But on Armor down, you don't do that.
- 20:22You get your output in your code, editor, your file, it's
- 20:28just code. Your file is just the Martin
- 20:33code that you rode with the python code or our code or C++
- 20:38code that you wrote etcetera and you can mix all of those in the
- 20:43same document. You you can very easily create a
- 20:47cell for Python and then The next cell is for our and then
- 20:51the next cell for batch etc. Etc, etc.
- 20:54Coding jupyter, notebook. In contrast, you need to choose
- 21:00a colonel and you can run everything with that Colonel.
- 21:04Maybe you can mix. I'm not sure.
- 21:06I haven't done it. If you have its tell me, but at
- 21:11least as far as I know you need to choose a colonel and run
- 21:15everything with that kernel, you can run our, you can run but you
- 21:19Also on jupyter Notebook, if you change the colonel but you need
- 21:24to choose one on our studio armor down and korto.
- 21:29You can choose whatever you want.
- 21:31So it's much more flexible going back to the the problem.
- 21:37We saving your your output on the file.
- 21:41That is really a pain in the ass to because if you try to commit
- 21:47that into a git Repository, You will be very quickly start to
- 21:53use a lot a lot of memory because when you change and
- 21:57upload every time you change the plot and you can meet that, you
- 22:01are committing the whole blood and the whole blood is, I don't
- 22:05know, maybe 100 lines, 200 lines of code that change and maybe
- 22:12you. You only change one point.
- 22:14Maybe it was a scatter plot with just one difference or maybe you
- 22:17change the limits of your lat and that will save a whole new
- 22:22plot and that will happen for every one of your output.
- 22:26If you plot the data, the data frame or ahead of that of data
- 22:31frame, you will also save that data.
- 22:34And you, if you commit that, and you send it to your repo, if you
- 22:40are working with on a open repo, for example, you could be
- 22:44filtering out sensitive information that you shouldn't
- 22:48because So one thing is to share your code, maybe your code is
- 22:54open source or maybe your colleagues to private, but
- 22:58another whole different things to share data.
- 23:01Sometimes you are working on an open project.
- 23:04But with private data, with jupyter notebook, you can you do
- 23:09good sleep. So then dated you could be
- 23:14following some security issues. For me, you spoke about these
- 23:20different, basically, the templates that you have for the
- 23:24data scientists and you also are talking about are now and I know
- 23:29that you mentioned, you're very proud of a setup that you have
- 23:34put together with a few other of your colleagues.
- 23:37Can you walk us through what that setup is and what it
- 23:40entails and why it made you so proud to have put that into
- 23:45Practice at your current job. Yeah.
- 23:48When I started working as a data scientist about 60 years ago,
- 23:55with think my first assignment as a junior there was to put in
- 24:01put in place many of the tools that we were going to use
- 24:06forward because I was the first data scientist on my job.
- 24:10I started digging like best practices and stuff like that.
- 24:15And I found a pretty good video. I don't remember who was talking
- 24:20but it was a video about good practices about on data science
- 24:24from 2017. Maybe quite no no to see 2015.
- 24:30Quite all, they show up a project template that it made
- 24:35sense for me, but I felt it wasn't complete.
- 24:38So I really based on that started adding progress.
- 24:44The, a lot of things with a lot of iterations with talking with
- 24:49other co-workers and we ended up with a project template that
- 24:55it's in my opinion, pretty General, you are not forced,
- 25:00you're not to force to do stuff, one way, or not, or than, or
- 25:04another, but it gives order to the project.
- 25:09So the, the basic idea is that when you are working with data,
- 25:16you are working kind of with a data flow.
- 25:20So you, let's let's speak about data in the general sense.
- 25:26You can have data as a data frames or I mean csvs or
- 25:33whatever storage you. You have your data on door,
- 25:36maybe images, or maybe just config files, everything there
- 25:42is data at the end of the day. So what we try to do is to have
- 25:48a pipeline of of many scripts that take an input data gives
- 25:56you an output date. So every streak, maybe with some
- 26:01a couple exceptions will take input data and will give you
- 26:05output data for that that script.
- 26:07And then the next script will take maybe input data from the
- 26:10last script and maybe from other sources and output.
- 26:14Something else and so on. So on, so, on that is very
- 26:19useful in my opinion, because when you are running a whole
- 26:24pipeline, if you work, you if your pipeline breaks, at some
- 26:28point, you will know where you where it broke and you will
- 26:33know, okay? At least I have everything at up
- 26:35until their correct. I need to debug this section
- 26:40this script and then I can run from there too.
- 26:44And it's sold something that I hear many people who use jupyter
- 26:51notebook, talk about, which is that with jupyter notebook, you
- 26:55don't always have to run everything again because it sits
- 26:59there and the outputs. And what I always say to them is
- 27:03why don't you save your out into well folder, a specific folder.
- 27:09So there we are solving that, that problem and Each file has a
- 27:16certain output. So if you have a lot of outputs
- 27:20it could be kind of messy at the end of the day because you could
- 27:25have, I don't know, ten output files for one project because
- 27:30you have 10 scripts so it could be messy to know where each
- 27:34output comes from. So what we do is that each time
- 27:39a script saves a file, it saves it with a with the prefix and
- 27:44the Graphics, its kind of the ID of that script.
- 27:48We're right pipelines with specific prefixes.
- 27:52For example, 800 a01, a02 Etc. So whenever you see an output
- 28:00with the prefix AC, or to, you know, that the ACO to file
- 28:05produced that that output. So if that output is incorrect,
- 28:10you already know where to go. Look for where you need.
- 28:14To go debug or study another very important point is to
- 28:20modularize your code. In our team, we try to break our
- 28:24whole process into many different scripts.
- 28:26So, we have this checkpoints, for example, we can have the
- 28:31pre-processing broken down to 10 different steps.
- 28:35First, we read the data and then we read another data and we mix
- 28:40it. We merge, the set, and then we
- 28:43take that in another screen. And clean the missing values or
- 28:47duplicates Etc. And so on and so on each script
- 28:51should be doing one job. Kind of like functions but not
- 28:56that much. We use a lot of functions inside
- 28:59once created. And so it's not that specific,
- 29:04but it's very useful because you know, that one strip is going to
- 29:09be doing one job, and the job that is doing is also in the
- 29:13name of the The script, the name could be a 00 underscore
- 29:20reading. First Data set.
- 29:23Weather dot by the are or whatever.
- 29:26So it's very tidy way to organize projects in my opinion.
- 29:32And also it allows you to mix many languages together because
- 29:38every script is independent cops.
- 29:41You have to immerse yourself in the amylose content.
- 29:44And the best way to do it is to subscribe to the email Ops
- 29:49Community podcast soon. Good luck and keep learning So
- 30:00if you want to mix python script with a with an R script, it's
- 30:05very easy because you just write your python script which will
- 30:09have an input. Will do something will have an
- 30:12output and then that output you can read it with an R script and
- 30:16do something with our have an output.
- 30:18Then you read that with another script with whatever language
- 30:22you want and go and so on. So one of the questions I have
- 30:27on this one because this does seem like a very good way of
- 30:31thinking about problems. Instead of just doing things
- 30:34randomly, one of the main reasons of one of the things
- 30:37that I've seen is, sometimes one of the Cordia scientist that is
- 30:42working on a project leaves Midway, and it's a very easy to
- 30:46bring on. If you already have such an
- 30:48existing structure, the it's very easy to bring on a new
- 30:51person or for everybody else on the team to sort of pick up the
- 30:54work. From a theft.
- 30:57But one of the things I wanted to ask you on along these lines
- 31:01with more. So how much of all of this is
- 31:04documented how much of the script?
- 31:06How much effort is put into the script documentation and
- 31:09everything, so that everyone knows what is the real
- 31:12significance of this. Also, another thing, which is
- 31:16basically the do we really need the script?
- 31:19How do you sort of identify that you're not putting too much
- 31:22effort and designing structures? That could probably be just like
- 31:27a one-time use on this break template.
- 31:30We have, we have a lot of folders, different different
- 31:33folders. For example, we have the file
- 31:35folder, the files folder where we have everything, basically
- 31:39that we don't want to commit the data sets or documentations or
- 31:46references to papers logs figures at the models that they
- 31:51the object of the model. That is saved everything.
- 31:55Sabin files on different subfolders which are data sets
- 32:00documentation and model output and on model output, we have the
- 32:06object of the models on one folder logs and another folder
- 32:09for figures and another folder reports on another folder Etc.
- 32:14So it's very easy to go and find whatever you you are looking for
- 32:18the data sets, we separate them on input data, intermediate data
- 32:23and output data. We could add more more layers if
- 32:27we want and there is an out of files.
- 32:30We have many other different folders.
- 32:33For example, we have the pre-processing folder.
- 32:36Where is all of the processing for whatever you are doing the
- 32:40models, the model folders were you have the scripts for the
- 32:44models that you are working on the reports folder, where you
- 32:49have the scripts for the report? Not the reports itself because
- 32:54those are safe. On the files folder.
- 32:56But the the script of the reports and we have also more
- 33:01folders that I'm not going to get into right now, but we have
- 33:04a Sandbox folder. So whenever you are starting a
- 33:09script and you don't quite know where it's going to land, or if
- 33:14it needs to be split into or whatever, we usually develop
- 33:18that on the sandbox folder and everything on Sandbox.
- 33:21It's not officially in when you receive a Eject from us,
- 33:26everything on Sandbox, you can delete it and there's no
- 33:29problem. But you can start working on on
- 33:32Sandbox. And when you already know what
- 33:36you will need, what we are doing, how much splitting you
- 33:41need to do, then you split that in, I don't know, two scripts
- 33:45for example and you place them wherever they need to go.
- 33:50This also makes me think of a very interesting direction that
- 33:53be going towards, which is The more popular books in the field,
- 33:56which is basically from monoliths to microservices.
- 33:59I think that's sort of a be taking off, which is 12.
- 34:02Ping particular API is very different things because you're
- 34:05managing everything so well, you can easily continue to rise it
- 34:09and debug individual Parts as well.
- 34:13That's another important point. We put everything there on a
- 34:19container, so it is easy for for it to run on.
- 34:25On what whatever computer you are you are using and with the
- 34:30virtual environments for every language because you can have a
- 34:33virtual environment for python another virtual environment for
- 34:36our and it's it's very easy to set up both of them and that way
- 34:42you can have no troubles when you put that into production in
- 34:46the intermediate. So if you want to go into
- 34:48communities, you can have her questions as well.
- 34:52No, I'm actually I really like the The fact that you spoke
- 34:56about reproducibility earlier and now this seems like you're
- 35:00organizing everything so that reproducibility is that main
- 35:04player and it's in the Forefront of what you're doing.
- 35:08Did you get burned enough times to where you realize that needs
- 35:12to be very much a part of what we do or was it just something
- 35:17that came from software engineering that you had in your
- 35:20blood? How did you realize that
- 35:23reproducibility was so important and then then why have you
- 35:27started implementing it or what other things have you done to
- 35:32implement it besides the scripts that you're talking about?
- 35:35I'm not quite sure where it started but I like to think
- 35:41problems in a broad kind of stunts in a general manner,
- 35:44maybe it was a little bit influence because I study math.
- 35:48So when you study math you have to abstract yourself a quite a
- 35:53lot and think about Random bizarre spaces.
- 35:59So I did not study computer science, but I really like it.
- 36:03I saw that influence it a little bit too, but I did have some
- 36:11kind, some troubles on some project because I need to run
- 36:17something manually for a specific project.
- 36:21So every day or not, every month, I need to run.
- 36:25Something. I need to take me like, two days
- 36:27to run that every month, so it wasn't too much, but it was
- 36:33annoying. I was just losing my time, so I
- 36:37started thinking how I can how to make this and do it in a more
- 36:43General way. So I think that all of these
- 36:46factors contributed but I'm not sure if there is kind of a
- 36:53particular one. That was More important.
- 36:56Another question is, let's say, I don't know if you do, you
- 37:01might have some scripts to be able to manage the events and
- 37:04stuff which is the entire event processing side of things.
- 37:09How do you, or how often do you cater to the schema changes on
- 37:13that one? What they mean with schema
- 37:16changes. So anytime you're working with
- 37:19any sort of events, there are schema changes over a period of
- 37:23time for the events, which is wherever you're putting your
- 37:25events from how often you use it as a team and go like, okay,
- 37:29let's go into the code work. On the news changes that have
- 37:33been made in there in the source where we're pulling our
- 37:36diaphragm and now let's let's make sure everything's sort of
- 37:39adapted to that. Hmm, with the event, you mean
- 37:44class? Like kind of get have actions, I
- 37:47or stuff like that. Or what kind of events are you?
- 37:51Are you speaking? Are you to be able about?
- 37:54So it could be something like e.t. elevates.
- 37:58So, not not not essentially on the cic Deep.
- 38:01I'm also around the DI acquisition side of things
- 38:04because that's where a lot of changes have happened at least
- 38:08for me, which is any time we're working with a lot of integrated
- 38:11Services. Later.
- 38:13We are using 4 different. Services that are 14 or a
- 38:17payment Gateway and maybe the small so happens who waited
- 38:20because I've worked with e-commerce company specifically.
- 38:23I don't know how much of it happens at your work which is
- 38:26you're working with different services and they have changes
- 38:29in the code word changes the schema for you and that would
- 38:32make sure that you now have to sort of adapt on a few scripts
- 38:35accordingly. Okay.
- 38:38So you mean if somebody is as and if something changes in kind
- 38:42of the data or the structure of how things should work or moving
- 38:47to the Apes, all plays out of that stuff, okay, we don't work
- 38:52that much with apis. We work with internal data.
- 38:56I work for a telecom company, so we had all of the information in
- 39:01house. What you should lie changes
- 39:05although it's so The materials. But not usually sometimes,
- 39:09sometimes CDLs change. We need to add that.
- 39:13Do we need to correct this these models and what we are trying to
- 39:18do. But we are not yet, doing we are
- 39:21starting is to implement. I like a library called Great
- 39:27Expectations, which is very useful to assure that your your
- 39:34data quality is Maintain, and if it's not, it will tell you, it
- 39:41will give you an alert. And I think it's very, very
- 39:47useful. And we are starting to to use
- 39:52Great Expectations. And the idea at least is to use
- 39:57a couple checkpoints in the in the whole process.
- 39:59For example, at the beginning of the, of the model of the
- 40:02beginning of the kind of the pipeline of the model and we We,
- 40:07we want to check if the raw data set is has a still the same
- 40:12structure, the same columns, the same data types Etc.
- 40:19At the end, we went to check that.
- 40:22The model is outputting the kind of the same structure of data,
- 40:27Maybe with a given distribution or something, similar to that
- 40:34distribution. And in between we can place a
- 40:39couple more checkpoints to for example, to check that the the
- 40:43model. When you give the data to the
- 40:45model, we are giving it the right data to process it in the
- 40:49right manner. So at least those, three steps
- 40:53are very important in my opinion, and it's very useful to
- 40:58control those changes in kind of the ecosystem.
- 41:03You said, you have a lot of In-House data that is entirely
- 41:07owned by you. How do you or do you have like a
- 41:11deer cataloging solution is a built-in house for your team or
- 41:15do you use an external one? Also what are the words?
- 41:20Some things like you've learned along the way, which is how to
- 41:22build the right kind of data cataloging solution.
- 41:24Because I think one of the things that a lot of people
- 41:28don't talk about as often. It's the quality of your code is
- 41:31not directly dependent on the number of hyperparameters or the
- 41:36newer. Your mother but actually on the
- 41:37quality of the tea itself and that's where we sort of need to
- 41:40put in a little bit more effort. We did have a data catalog but
- 41:46it was internal like building house, but now we are moving to
- 41:52a new data catalog for the whole company because they want that
- 41:57we were using was only for the analytics team not for the whole
- 42:02company. But now we are working with
- 42:05another Another company to build data catalog company
- 42:11company-wide another working on that directly.
- 42:14So I don't have the details and even if I had, I don't know if I
- 42:20could share them, but I know that there are people working on
- 42:26that. So I want to go back to
- 42:29something. You said earlier about the data
- 42:31flows and you mentioned let's look at data as if it was this
- 42:37idea of it flowing and going from one place to another with
- 42:41the inputs and the outputs and then you don't have to think
- 42:44about. Am I using are on this piece of
- 42:47data in my using python. It's all just going into
- 42:51something flowing into something and then flowing out of
- 42:54something. Yeah.
- 42:55How else have you been? Thinking about that because or
- 42:59house. If you been generalizing that
- 43:01idea and using it, when you're designing the system that you're
- 43:06working with, there's a another folder that I didn't talk about,
- 43:10which is called pipelines. And there, we have the most
- 43:14important files because they're, you build the real Pipeline.
- 43:22And I mean, the Bible and for development, not for production
- 43:27and Necessarily. But there are the data
- 43:31scientists scanned called each script.
- 43:34In a certain order, if we are working with parallel processing
- 43:39or with serial processing, it doesn't matter much in terms of
- 43:44writing your script, it will always be serialize.
- 43:48You always write things in a Serial manner.
- 43:53Even if it runs parallel you have to write something before
- 43:57dealing one. Fake.
- 43:58So in this pipe lines you can call every script.
- 44:02Do you want run them in parallel, maybe or in in series
- 44:09in the end of that, that script of Pipeline and you can output
- 44:16all of the kind of the accumulative log of every every
- 44:23file, and you can print how much time did it too?
- 44:27For every, every step for every, every script Etc.
- 44:33And I think that's, that is very useful because you can then
- 44:39write in your read me and your Martin rid, me of the project
- 44:43and you can write a section on how to run this project and it's
- 44:49basically just run this file it. Maybe you have a lot of
- 44:53pipelines and each pipeline is for a specific.
- 44:57Acidic task. So you can say, well, if you
- 45:00want to give a score for every, for every client with these
- 45:08parameters, just run this script and you name it.
- 45:12And that way that pipeline will do, we know that you and you
- 45:16have to run that tied line, and that pipeline will do all the
- 45:19other job. They will call every, every ski
- 45:25every street every script will take They're out if their inputs
- 45:29and give you their outputs respectively.
- 45:32And when you do her eyes that, you just have to run one line of
- 45:37code, do care run and you get the the path to that pipeline
- 45:44that you are interested in. So it's pretty easy to put into
- 45:50production afterwards. The, the envelopes engineer
- 45:53doesn't need to understand everything that is going on.
- 45:57On in there as long as the data, scientists, understand State and
- 46:02makes sure that it's well structure.
- 46:06The envelopes engineer can just take it and run that line of
- 46:10code. And that's that's all the Prague
- 46:13will work, ask the data scientist intended that list.
- 46:18So, As far as. This goes, man, there's so much
- 46:24for me to chew on here that we've talked about and I really
- 46:28appreciate all these different insights.
- 46:31Now that we're getting to the end, I know that you had a ton
- 46:35of stuff that you mentioned. You could talk about, we hit
- 46:39almost everything, but is there anything that you wanted to talk
- 46:42about that? We have not hit yet.
- 46:44While you're thinking you mentioned to me, these are the
- 46:47things that I end up talking with people about, and I end up
- 46:50having strong opinions on And so, I think we could talk about
- 46:54a Minute Podcast and you do not need to say anymore to me if you
- 46:59want to do that, then I'm all-in.
- 47:03Yeah and maybe there are two topics which happened we come
- 47:07and talk about. The one is the the fact that I
- 47:11really think the elbow method, this is more for data scientist.
- 47:15Not for envelopes Engineers. But the elbow method, it's just
- 47:18a lie. It's an illusion and the other
- 47:21one is the agile methodology. Many people don't like them and
- 47:24I don't like the agile methodology has that kind of
- 47:27scram. But I think that there are there
- 47:30are a lot of very good things that you can get out of that and
- 47:36use for your team. These are the two topics I think
- 47:40we haven't talked a so what is? Yeah.
- 47:43Can you break down the elbow methodology?
- 47:46And let us know why you have to sit.
- 47:50It's easier if you. You beat realize it.
- 47:54So if there are people listening to this on Spotify, it won't
- 48:00help to share screen. So I just recommend you to
- 48:07create our Vector for, I don't know, from one to ten, ten
- 48:12thousand and then get the exponential of negative X.
- 48:21Where X is the Ha and blood that you will get a shape pretty
- 48:28well-known shape, which is very similar to what we usually get,
- 48:35when we are studying, clustering, and we plot how how
- 48:42much more information we are getting out of one more, one
- 48:47more, one more cluster. So just take that tape and then
- 48:51ask yourself. And where is the optimum cut?
- 48:55Where you, you gain enough information.
- 48:59So it is worth it to split. One more your, your groups and
- 49:05you will get a value, but everybody with this, it doesn't
- 49:09matter. And then after yourself, well
- 49:12maybe you tried five groups, one group two group, three groups,
- 49:18four and five. So we you have five points now.
- 49:22Do the same. But try with 20 groups.
- 49:25So we do we'll have 20 points and the optimal point will
- 49:29change because your perspective will change, you will see the
- 49:33same points, but visually, it will be different and the same
- 49:38with 100 points. And it will be different.
- 49:41Do you will find a new optimal? So it is not a good method to
- 49:46find the optimal amount of groups to split what I would
- 49:52rather. Either do is to take the points
- 49:54that I suspect are kind of good run, I don't know.
- 49:59Run whatever. I want to run with that
- 50:01afterwards. A model or a prediction or
- 50:03whatever run that and measure how much how much better is one
- 50:10versus the other with the methods that you really value
- 50:16with. I don't know we the error or I
- 50:20or the procedural requirements. Or what whatever you're
- 50:24measuring, but get the better amount of groups based on that,
- 50:31not the elbow method because the elbow method, it will depend on
- 50:34how many points. You are testing, right?
- 50:37So that's the sort of core idea behind cross sampling as well,
- 50:40right? I'm not sure.
- 50:43I'm not sure what crossed something is what do you mean?
- 50:46Exactly. Um so basically when you have a
- 50:49sample of data that you've working but instead of Taking
- 50:53disparate samples for examples in two different parts, which is
- 50:56collected, different things so that you have sort of enough
- 50:59diversifying the samples and then covert ever works.
- 51:02Best instead of taking on a group in sing, let's go work
- 51:06with this group of data down, its kind of this, similar idea
- 51:10one other piece before we go. You're leading three many teams
- 51:15inside of the company and they're focused on security.
- 51:19I want to just touch on this for a moment because I think
- 51:22security is one piece of machine learning and ml Ops in general,
- 51:28that does not get talked about enough.
- 51:30What can you tell us about? Your learnings from leading
- 51:34these teams? How are you looking at security?
- 51:37Now, how is your view of security and how you do things
- 51:40changed over the time since you started leading this?
- 51:43Teams the most amount of work that we have done on security
- 51:47issues. Inside the team has been related
- 51:52to The Geek or git repositories. It is very I already spoke about
- 51:58this but you can very easily share sensitive data by mistake,
- 52:03right? Maybe you, you are writing a
- 52:05code, you commit something by mistake.
- 52:09It's it will stick their you. You can maybe you can erase it
- 52:15later but it will stay there in your history of to repository.
- 52:20And that that is one of the virtues of get near you.
- 52:25You can Retreat, whatever you you were working on.
- 52:28If you wrote a password, for example, a password for for a
- 52:34database which is, well, it's a lot of people has done it.
- 52:39I've done it. I've written my authorization
- 52:42code in them. After use, like, get Guardian to
- 52:45Sir cash stay alert and be like, oh, shit, I'm exposed
- 52:49information story goes toward and then lamech variables.
- 52:55Yeah, that that's very, very common.
- 52:57I think I have done it also and I have, but I think that the
- 53:02most important thing is to know how to clean that, because you
- 53:06can there you at the end of the day, you have a hidden file on
- 53:11your repository. That MoDOT get file inside
- 53:16there, you have all of the history of all the changes, you
- 53:20have done. So one, one quick way to solve
- 53:24that is just delete that file but that it's not the ideal
- 53:29solution because you will lose all of your projects history to
- 53:34you will see a you will still have your, your working
- 53:40directory. So you can salvage some some
- 53:42things But it's not the the ideal solution.
- 53:47So what we did was to use a library called BFG which stands
- 53:54for big. Big tracking No Big B XG is big
- 54:01dragon from Doom. I don't know if you have played
- 54:04them, but there is a pretty huge gun, which will deliberate
- 54:10everything inside. So this Library.
- 54:14Does that with get and you can, you can select which things
- 54:18expects. Specifically is specifically, is
- 54:22it's going to erase so you can give it a limit on MB, maybe you
- 54:27can you want to erase everything that has, more than that way.
- 54:32It's more than 10 megabytes because maybe you accidentally
- 54:37committed a CSV file with data and you want to reach that.
- 54:41So you can, you can erase Everything, which is too big
- 54:45because if it's too big, it probably shouldn't be in your
- 54:49git. Repository git, repositories are
- 54:51made to store code to check differences between lines lines
- 54:56of code, not between whole files.
- 54:59That's one very, very useful thing about that Library.
- 55:02It's a Java library and you can download it and then just call
- 55:07it with jar and the other teeth. A very useful thing that you can
- 55:11do is to Delete specific commits.
- 55:16Maybe you. You already know that in a
- 55:18specific commit, you come into the password or you committed a
- 55:22data set or you can meet it. Whatever.
- 55:26That is very sensitive. So you can go ahead and tell
- 55:29that library to get erased that commit, what happened to us in
- 55:35our team is that many people had done this in many projects.
- 55:39At the same time we need to Erase like 200 Repose or we need
- 55:49to tweak 200 trips. So he, it wasn't viable to do it
- 55:55one by one because we didn't even know where we need to
- 56:00delete. So what we did was to create a
- 56:04mixture of everything and they and here, I'm going to go back
- 56:08to the multi-language topic. We created a Python file to
- 56:15recognize regular Expressions on our repository.
- 56:18So, we download the, we downloaded the repository, we
- 56:22dyed into each repository individually with a simple form,
- 56:26then we, we search for certain keywords, like past PWD.
- 56:34Password, etc. Etc, etc.
- 56:37So we we found all of the possible.
- 56:43Security breaches. And I say possible because
- 56:46sometimes we had like password equal password so that was not a
- 56:52security breach but we managed to get all of the possible
- 56:56security breaches and then in with that.
- 56:59But when somebody scripting we automated that, and then when
- 57:04everything was ready and everything was clean, we the
- 57:08armor down. We did, we did some reports on
- 57:12that. So, So at the end of the day,
- 57:14when when I run the, the project this project goes and takes all
- 57:20of the data in our workspace and on bitbucket, and cleans it, and
- 57:25then push it back to, which forced the clean repositories
- 57:32and then outputs a report. We how many security breaches
- 57:37has every every repo? How many there are left?
- 57:41How many there are left that we need Still take a look into
- 57:45because when you, when you use this, you cannot change your the
- 57:51main branch or Master Branch you do, you cannot change your
- 57:54production Branch because you will break everything.
- 57:57So if the problems are still there, you need to go ahead and
- 58:02fix it. Commits something new and then
- 58:05clean the game. So everything here, we did it
- 58:08with multi-language develop development and we just use the
- 58:14right tool to do the the best tool to do the job that we
- 58:19wanted to do in that specific section, incredible.
- 58:23Dude, this has been more than I bargained.
- 58:27For I want to thank you so much for coming on here.
- 58:30Head teaching me so much that I did not realize beforehand.
- 58:36I mean, this little foray into security was beautiful.
- 58:40Thank you so much. We're going to end it here.
- 58:42And in case anyone wants to get a hold of you.
- 58:46I know you do stream. If somebody wants to watch you
- 58:49streaming, where can they find them that?
- 58:52Yeah. Yeah, we stream with two friends
- 58:57from two co-workers and we usually talk about data science
- 59:01related topics. Last time we talked about Great
- 59:04Expectations and tomorrow we are going to talk about the DPT 3
- 59:10and so on. So on we talked about a lot of
- 59:13things related to that and the our twitch channel is called and
- 59:18coders with a underscore and underscore coders.
- 59:22We also About YouTube channel with just one video we are
- 59:25working on that. We're very very busy certain
- 59:29gotta start someone yeah. At least there's one.
- 59:34Excellent. Well thanks man.
- 59:35This has been awesome. Yeah, I'll also link.
- 59:38Meaning, if somebody wants to connect the week, we will leave
- 59:42all these links in the description in case anyone wants
- 59:44to check it out. Yeah, thanks a lot for the
- 59:46invite. Thank you so much laughing.
- 59:49See.