No such lock file error

I believe I have to restructure my repo to only have one experiment/set of models/params per commit. Am I understanding that correctly?

Prior to using dvc I was keeping a lot of directories in the same repo with different experiments/images/models and I think this causes issues because dvc looks through all the irrelevant directories. This at best slows it down, at worst, causes weird errors like the below. I am working on refactoring the repo for this design but I would still like to get my metrics in the experiment view in VS code for the old repo. I wrote a minimal pipeline to do that but I keep getting this error and experiments won’t run with dvc exp run due to this error.

2024-12-10 09:12:42,594 ERROR: unexpected error - [Errno 2] No such file or directory: …
FileNotFoundError: [Errno 2] No such file or directory: ‘…\.git\objects\f2\1dc4aa22e84f6a591537e146d1faddea2a5214.lock’

What does this mean?
There is nothing in the object\f2 directory, why is it looking for this lock file?
How can i tell it not to look for such a file or find some reference to it and delete it?
Is there a combinations of flags to help me ignore this or debug better (tried -vv, -s, --force without success)

Can you share the full verbose traceback, please (try adding -v to the output)?

AFAIK this lock is coming from while writing git commit for the experiments, so that multiple files don’t create commits. But I am not sure why those files don’t exist. You can also try adding breakpoint() to the place where the issue got raised or add --pdb to dvc commands.