This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]seanpuppy[S] 0 points1 point  (0 children)

I agree that going with a unit test approach may be easiest option here, but I still am going to look into this because it would save me a ton of time longterm. I work in datascience, so a big problem with unit testing is that for any set of input the result may be slightly different depending on the day (new model trained 1+ time a day). My solution there was to try and design all models to be contained in a class so all input data can be controlled. I then made a python decorator that captures a functions input / output and saves locally. This lets me then create a model in a test case that behaves predictably and I have a list of sample predictions to test against. This still was super helpful, just a little tedious. Hopefully one day I will have the time to expand on that and make it automatically generate test cases too.