r/MachineLearning • u/Wrong_City2251 • 11d ago
Discussion What coding practices are you adopting for development today? [D]
I have been reflecting on this while working on a project recently. Every time we start a new model, we rewrite roughly same scaffolding, data validation checks, feature transformation logic ; all of this is nealy 80 percent identical to last project
I tired templating with cookiecutter style project generators. Initially it was okay, but it drifted from reality since noone wants to maintain a template repo. So tired a shared library approach, it helped and was much better. But weiting glue code to wite everything is still bug prone
Now i am experimenting with genie code to generate the boilerplate, the repetitive code, config parsing etc. it is decent for that part, though it starts hallucinating if columns increase say lot more than 40-50. It is not silver bullet, but it is cutting down the project setup time from 3 days to less than 1 day
So the deep question i am having now is, should we even write code? The config driven approach seems to be good, but eventually we are bound to suffer in a few months time when we start needing something non standard. Is there a middle ground, writing everything from scratch - the opinionated framework that becomes prison. How have you guys been developing? What are you adopting?
3
1
u/Responsible_Status49 8d ago
I’m not sure if the hallucinations you are seeing past 40-50 columns are a problem with the coding agent or how you trigger it. Inferred knowledge costs a lot more than explicitly declared. So if you tell Genie Code exactly which columns, schema, metadata, joins, etc. you need, I expect the quality to sustain for longer. Even better, record those as a skill, since it seems like you are redoing the same work for all projects. If the schema is not exactly the same, record the ground rules of how you want the schema to be in a skill. I believe genie code allows both individual and shared skills.
-7
9
u/Achrus 11d ago
You might save 1-2 days on project setup by letting an LLM generate your queries / data loaders / configs.
However, how do you trust and validate your workflow? Real data is messy and the code you are generating is biased towards all those data science bootcamp bloggers from pre-COVID. Leaving you with bad data since the LLM didn’t account for business specific imputation rules, improper joins on mismatched keys due to formatting inconsistencies, and it may even be reading in the wrong columns.
Maybe someone catches the errors and now you have to debug way too much code with no understanding of your data, adding months to the timeline. Maybe no one catches it and you push everything through and get that pat on the back. Someone will catch it eventually, hopefully before opening your company up to liability; but, you can try and hand it off before that time comes.
This is all without considering how bad LLMs are on actually thinking through the ML side. Model selection, parameter tuning, preprocessing, statistical tests. All biased by those data science bloggers mentioned earlier.
Now if you want to be a B+ on your project analyzing Boston Housing data in an intro to ML course then LLMs will be great for that. Boilerplate or not you should spend the time to understand your data.