Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge aborts rather than exiting cleanly #187

Open
craffel opened this issue Feb 11, 2023 · 0 comments
Open

merge aborts rather than exiting cleanly #187

craffel opened this issue Feb 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@craffel
Copy link
Contributor

craffel commented Feb 11, 2023

I get error: add_cacheinfo failed to refresh for path 'model.pt'; merge aborting. at the end of a merge which otherwise seems to work fine (this is on guava).

$ git init
$ python -c "import torch; torch.save({'a': torch.tensor([1., 2.]), 'b': torch.tensor([3., 4.])}, 'model.pt')"
$ git-theta track model.pt
$ git add model.pt
$ git commit -m "Add model.pt"
$ git checkout -b change
$ python -c "import torch; torch.save({'a': torch.tensor([1., 2.]), 'b': torch.tensor([3., 5.])}, 'model.pt')"
$ git add model.pt
$ git commit -m "Update model.pt"
$ git checkout master
$ python -c "import torch; torch.save({'a': torch.tensor([1., 2.]), 'b': torch.tensor([3., 6.])}, 'model.pt')"
$ git commit -m "Update model"
$ git merge change
Fixing Merge Conflicts in model.pt
b: Both them and us changed this parameter.
Actions:
  avg-all)  average-all: Average our change, their change, and the original parameter together.
   avg-ao)  average-ours-original: Average our change and the original parameter together.
   avg-ab)  average-ours-theirs: Average our change and their change together.
   avg-to)  average-theirs-original: Average their change and the original parameter together.
       to)  take_original: Use the original parameter.
       tt)  take_them: Use their change to the parameter.
       tu)  take_us: Use our change to the parameter.
        q)  quit
𝜃 avg-ab
Auto-merging model.pt
error: add_cacheinfo failed to refresh for path 'model.pt'; merge aborting.
$ python
Python 3.8.10 (default, Nov 14 2022, 12:59:47)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.load("model.pt")
{'a': tensor([1., 2.]), 'b': tensor([3.0000, 5.5000])}
@craffel craffel added the bug Something isn't working label Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant