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

GitError #18

Closed
minchong1998 opened this issue Mar 3, 2021 · 7 comments
Closed

GitError #18

minchong1998 opened this issue Mar 3, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@minchong1998
Copy link

i think your work is charming and i want to learn more about it. when i run the code, it has some error that is:
File "main.py", line 250, in
main(args_)
File "main.py", line 197, in main
checkpoint_saver = Saver(args)
File "/home/mc/Project/stereo-transformer-main/utilities/checkpoint_saver.py", line 24, in init
self.save_experiment_config()
File "/home/mc/Project/stereo-transformer-main/utilities/checkpoint_saver.py", line 41, in save_experiment_config
repo = Repository('.')
File "/opt/anaconda3/envs/GWCNet/lib/python3.6/site-packages/pygit2/repository.py", line 1494, in init
path_backend = init_file_backend(path, flags)
_pygit2.GitError: Repository not found at .

can you give me some advise to deal with it? thank you.

@mli0603 mli0603 added the bug Something isn't working label Mar 4, 2021
@mli0603
Copy link
Owner

mli0603 commented Mar 4, 2021

Hmm, so I am trying to log which git repo the experiment is running by pygit. Apparently the git information is deleted on your end. Can you try the following:

  • How did you get the code? Clone? Or download a zip file and then unzip? If you downloaded a zip file, this may be the problem. I recommend you clone the repo if possible.
  • If you cloned the repo, can you check if you have a local .git folder inside the stereo-transformer repo folder? If not, this is the cause. I don't know why it happened. Maybe try cloning again will help.
  • If you feel you don't need to log the git repo, you can just comment out line 41 and 42 here

@minchong1998
Copy link
Author

minchong1998 commented Mar 5, 2021

Thank you, the first advice work! But i get another error like following.Can you help me about this? Thank you very much!

File "main.py", line 250, in
main(args_)
File "main.py", line 221, in main
args.clip_max_norm, amp)
File "/home/mc/Project/stereotrans/utilities/train.py", line 33, in train_one_epoch
_, losses, sampled_disp = forward_pass(model, data, device, criterion, train_stats)
File "/home/mc/Project/stereotrans/utilities/foward_pass.py", line 55, in forward_pass
outputs = model(inputs)
File "/opt/anaconda3/envs/GWCNet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/mc/Project/stereotrans/module/sttr.py", line 100, in forward
output = self.regression_head(attn_weight, x)
File "/opt/anaconda3/envs/GWCNet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/mc/Project/stereotrans/module/regression_head.py", line 261, in forward
occ_mask = batched_index_select(occ_mask, 2, x.sampled_cols)
File "/home/mc/Project/stereotrans/utilities/misc.py", line 37, in batched_index_select
return torch.gather(source, dim, index)
RuntimeError: _th_gather not supported on CUDAType for Bool

@mli0603
Copy link
Owner

mli0603 commented Mar 5, 2021

Hi @minchong1998, hmm, maybe there is a bug. Can you give me more info? Which branch are you running? Which file gave you this error? There were some updates which may not be consistent across branches.

@minchong1998
Copy link
Author

thank you for your reply. I just want to train the model by myself, so I run main.py and it gave me this error. File gave me error is in the error massage.

@mli0603
Copy link
Owner

mli0603 commented Mar 6, 2021

  • Which branch are you on? Is it main branch?
  • Which torch version are you using?

From the log it looks like gather is not supporting bool type. I don't recall an error like this before.

@minchong1998
Copy link
Author

Thank you for your reply. It is the torch version.

@mli0603
Copy link
Owner

mli0603 commented Mar 10, 2021

Sounds good. Closing this for now.

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

2 participants