Ask HN: How do your ML teams version datasets and models?
Git worked until we hit a few gigabytes. S3 scales super well but version control, documentation, and change management isn't great (we just did lots of "v1" or "vsep28_2023" names).
DVC felt very clunky (now I need git AND s3 AND dvc) by the team.
What best practices and patterns have you seen work or have you implemented yourself?
34 comments
[ 1.7 ms ] story [ 293 ms ] threadhttps://mlflow.org/docs/latest/model-registry.html
Website: https://oxen.ai
Dev Docs: https://docs.oxen.ai
GitHub: https://github.com/Oxen-AI/oxen-release
Feel free to reach out on the repo issues if you run into anything!
Don’t store your data in git, store your training code there and your data in s3. And you can add metadata to the bucket so you know what’s in there/how it was generated.
https://github.com/dolthub/dolt
https://www.pachyderm.com/
Models are then stored in an S3 bucket. But since the IDs are unique, they can be exchanged and cached and copied with next to no risk of confusion.
We might need to add a database with more structured attributes for each model, but until now it hasn’t been a real problem.
This is enough to meet the legal requirements, as I understand things.
Some people are not credulous enough to take the salesman at his word.
But perhaps the best solution is to just use something like MlFlow or WandB that handles this for you, if you use the API correctly!
At this point it’s a build or buy type deal for models using a model registry service.
Data versioning still feels unsolved to me.
v1
v2
v2_<iso-date>
v3_final
FINAL_final
In response, I created a command-line tool that addresses these issues[0]. To reduce the comparison to an analogy: Dud : DVC :: Flask : Django. I have a longer comparison in the README[1].
[0]: https://github.com/kevin-hanselman/dud
[1]: https://github.com/kevin-hanselman/dud/blob/main/README.md#m...
We trained the whole team to:
- version the analysis/code with git - save the data to the bucket s3://<project_name>/<commit_id> - we wrote a small code to get the commit id to build this path and use boto3 to both access it and save it
We normally work with zipped parquet files and model binnaries and we try to keep them together in the path mentioned
It's super easy and simple, very little dependencies, and allow for rerunning the code with the data. If someone deviates from this standard, we will always request a change to keep it tidy.
Keeping track of data is the same with keeping a clean git tree, it requires practice, a standard, and constant supervision from all.
This saved my butt a many times, such as when I had to rerun an analysis done over a year ago, or take over for a colleague that got sick.
Look for something with good algorithms. Xethub worked very well for me, and oxen looks like a good alternative. git-xet has a very nice feature that allows you to mount a repo over the network [0]
[0] https://about.xethub.com/blog/mount-part-1
[0] https://dvc.org/doc/user-guide/project-structure/configurati...
https://www.anchorpoint.app/blog/version-control-using-git-a...