mlem icon indicating copy to clipboard operation
mlem copied to clipboard

Potential for a discrepancy in hash and size when artifact is store with dvc

Open Suor opened this issue 3 years ago • 1 comments

In dvc branch both .mlem/model/rf.dvc and .mlem/model/rf.mlem have hash and size for the same artifact. This feels fragile. One might update one of this independently, say *.dvc file:

cd .mlem/model
dvc pull
<edit> rf
dvc add rf
dvc push
git add rf.dvc && git commit ...

What do you thing @aguschin?

Suor avatar Jun 02 '22 13:06 Suor

I moved this issue from example-mlem-get-started repo here. The problem you mention @Suor definitely exists.

  1. I think we could issue a warning when MLEM loads a model, but binary have a hash different to what's in .mlem file (and maybe we already do, need to check this).
  2. We could add --check-hash-and-fail-if-it-changed flag to MLEM commands or something with a shorter name

Do you maybe have some ideas also?

aguschin avatar Dec 21 '22 06:12 aguschin