You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like gitpython is broken when one tries to use it from `git checkout hash`, see: gitpython-developers/GitPython#633
While debugging/bisecting we need to be able to step through different commits and for the code to still work. Currently it fails with:
```
ERR: File "./examples/seq2seq/distillation.py", line 504, in <module>
ERR: distill_main(args)
ERR: File "./examples/seq2seq/distillation.py", line 494, in distill_main
ERR: model = create_module(args)
ERR: File "./examples/seq2seq/distillation.py", line 411, in create_module
ERR: model = module_cls(args)
ERR: File "/mnt/nvme1/code/huggingface/transformers-multigpu/examples/seq2seq/finetune.py", line 58, in __init__
ERR: save_git_info(self.hparams.output_dir)
ERR: File "/mnt/nvme1/code/huggingface/transformers-multigpu/examples/seq2seq/utils.py", line 355, in save_git_info
ERR: repo_infos = get_git_info()
ERR: File "/mnt/nvme1/code/huggingface/transformers-multigpu/examples/seq2seq/utils.py", line 374, in get_git_info
ERR: "repo_branch": str(repo.active_branch),
ERR: File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/git/repo/base.py", line 705, in active_branch
ERR: return self.head.reference
ERR: File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/git/refs/symbolic.py", line 272, in _get_reference
ERR: raise TypeError("%s is a detached symbolic reference as it points to %r" % (self, sha))
ERR: TypeError: HEAD is a detached symbolic reference as it points to 'fb94b8f1e16eb21d166174f52e3e49e669ef0ac4'
```
This PR provides a workaround.
@sshleifer
0 commit comments