paschalidoud / neural_parts

Code for "Neural Parts: Learning Expressive 3D Shape Abstractions with Invertible Neural Networks", CVPR 2021
https://paschalidoud.github.io/neural_parts
MIT License
168 stars 21 forks source link

error in train.py fatal: not a git repository (or any of the parent directories): .git #2

Closed mahmoudEltaher closed 3 years ago

mahmoudEltaher commented 3 years ago

Hi, @paschalidoud ,

When I run the demo.py using the following command, I got the following type error:

python scripts/train_network.py config/shapenet_5.yaml output/ Running code on cuda:0 experiment_directory output/H6ICBWNS5 git_dir D:\Cottbus\code\neural_parts-master\scripts fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git Traceback (most recent call last): File "scripts/train_network.py", line 52, in save_experiment_params if epoch < e: File "C:\Users\Mahmoud Eltaher\Anaconda3\lib\subprocess.py", line 395, in check_output **kwargs).stdout File "C:\Users\Mahmoud Eltaher\Anaconda3\lib\subprocess.py", line 487, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['git', 'rev-parse', 'HEAD']' returned non-zero exit status 128.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "scripts/train_network.py", line 287, in

Create a batchprovider object to start generating batches

File "scripts/train_network.py", line 186, in main

Parameters related to the loss function and the loss weights

File "scripts/train_network.py", line 59, in save_experiment_params return optimizer File "C:\Users\Mahmoud Eltaher\Anaconda3\lib\subprocess.py", line 395, in check_output **kwargs).stdout File "C:\Users\Mahmoud Eltaher\Anaconda3\lib\subprocess.py", line 487, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['git', 'rev-parse', 'HEAD']' returned non-zero exit status 128.

Could you give some hints to solve this issue? Thanks,

paschalidoud commented 3 years ago

Hi,

It seems there is some problem with running git in your environment. Git is run to log the state of the repository when training a model. For a quick-fix feel free to comment lines 49-60 in train_network.py.

Keep in mind that this will disable logging the state of the git repository in the output folder. As an aside, I have not tested the code in Windows (I do not have access to a Windows machine) so you may encounter other problems as well.

Best, Despoina