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

Setup Issues from: Step 5 + (Windows - Anaconda) #16

Closed
AlonDan opened this issue Sep 15, 2020 · 22 comments
Closed

Setup Issues from: Step 5 + (Windows - Anaconda) #16

AlonDan opened this issue Sep 15, 2020 · 22 comments

Comments

@AlonDan
Copy link

AlonDan commented Sep 15, 2020

I'm trying to follow the Setup step by step for Windows 10 using Anaconda and Nvidia GPU.

When I get to step 5:
5. Setup submodules: git submodule update --init --recursive

I get this:
fatal: not a git repository (or any of the parent directories): .git

I skipped to step 6 and it installed the package with no issues,
So I tried to ignore it for now and proceed with the because I was curious about the Windows step:
Install included dependencies (downloaded from https://www.lfd.uci.edu/~gohlke/pythonlibs/):
pip install deps/windows/*

And I get this Error in red:
ERROR: Invalid requirement: 'deps/windows/*'

It says to download from the link, but... it's not clear, to download which file?
There are hundreds of links so I'm a bit confused and hope that anyone can help trying to install it.

Thanks ahead :)

@harskish
Copy link
Owner

For the first error, you need to download (i.e. clone) the repository with git, instead of downloading the repository as a zip.

For the second issue, there are four included dependencies in the deps/windows folder which need to be installed. If your terminal doesn't support installing then in one go (by using the wildcard *), then you need to specify them manually: pip install deps/windows/file1 deps/windows/file2 ...

Hope this helps. Closing the issue, feel free to reopen if there are more problems.

@AlonDan
Copy link
Author

AlonDan commented Sep 22, 2020

Thank you for trying to help, I appreciate it.

So I tried to follow your instructions as much as I understood (still a noob in this).
If it helps: I'm using Anaconda and Windows 10:

  1. I downloaded via: git clone https://github.com/harskish/ganspace.
  2. I follow steps Request - Trained weights #1 missing 'model.py' #2 AttributeError: 'TorchImageView' object has no attribute '_OpenGLFrame__context' #3 Interactive exploration using Stylegan2 model config-e #4 from the SETUP it works smooth once again (like my first attempt)
  3. Since step missing strided_style method ?  #5 didn't work, I tried your suggestion manually using pip install dep/windows/file1 dep/windows/file2 etc.. for all the 4 files. it seems like installation went smooth.
  4. I wasn't sure what's next so I tried to follow the SETUP again, on step missing strided_style method ?  #5 git submodule update --init --recursive it gave me the same fatal error, so I believe what I did in last step (3) was the answer, but I tried in any case because I wasn't sure.
  5. Following step Cannot run Ganspace -- RuntimeError: CUDA error: invalid device function #6 I tried to run the command: python -c "import nltk; nltk.download('wordnet')" but it didn't work:

cmd_2020-09-22_11-45-53

Back to the main page, I tried to run: python interactive.py --model=BigGAN-512 --class=husky --layer=generator.gen_z -n=1_000_000 just for test, but I get this:
cmd_2020-09-22_11-51-34

I'm sorry that I bother you once again, but as a noob this is very new to me and I believe I got "closer" to make the interactive viewer to run so maybe you can help me out with this last part I stuck on?

Thanks ahead, please keep up the good work! 👍

@woctezuma
Copy link

woctezuma commented Sep 22, 2020

What is weird is that your model is BigGAN-512, yet the error message mentions StyleGAN2.

If model.py cannot be found in models/stylegan2/, then that is an issue with the recursive command. Re-run:

git submodule update --init --recursive

@AlonDan
Copy link
Author

AlonDan commented Sep 22, 2020

When I run git submodule update --init --recursive I this error again:
cmd_2020-09-22_12-30-06

Do I need to download something extra and insert in one of the directories manually in order to make it work?

Do I need to download pre-trained models from some link? or it's all installed from the steps I already did? (sorry for the confusion)

I just followed all the steps + the instructions above so I don't really know what's missing or how to solve it...

@harskish
Copy link
Owner

The setup instructions contain all the necessary steps, you don't need to download anything manually. You need to make sure that all setup steps work and are executed in the listed order.

The command git submodule update --init --recursive is a necessary step, without it you won't be able to run anything. I'm not sure why its not working for you, you'll have to look around on Google. As for step 6 (downloading wordnet), the message 'already up-to-date' means you've run it successfully before, no need to re-run it.

@AlonDan
Copy link
Author

AlonDan commented Sep 22, 2020

I guess this git submodule update --init --recursive is my actual block so I can't run Ganspace as you explained.

I tried to google from the first time I got this error and also now so maybe I could find how to fix this this error but I didn't find any way to fix it. some youtube videos explain something about directory that doesn't exist or something like t hat... not sure if I followed, that's why I think maybe something is missing on my side (even after following all the steps as I described which went smooth so far) or maybe it's a windows / anaconda issue that I'm obviously not familiar with like most of the stuff around it.

But at least I tried... I guess no luck for me.
Still, looks like a very interesting project it's a shame I can't try it on my machine.

@woctezuma
Copy link

woctezuma commented Sep 22, 2020

Just to be sure, is Z:\GANSpace the cloned repository which you obtained with:

git clone https://github.com/harskish/ganspace

@AlonDan
Copy link
Author

AlonDan commented Sep 22, 2020

Just to be sure, is GANSpace the cloned repository?

I used git clone https://github.com/harskish/ganspace like harskih explained. all the files are inside that directory z:\GANspace (I followed all the steps while the environment is activate)

Maybe the problem is on my directory structure because I got rid of the sub-directory and put all in GANspace? because I wanted to have a shorter directory path:
explorer_2020-09-22_13-18-18

@woctezuma
Copy link

woctezuma commented Sep 22, 2020

I mean, you should do something like:

!git clone https://github.com/harskish/ganspace
%cd ganspace
!git submodule update --init --recursive

The error message which you get means that your folder is not managed by git, which should not be the case if it had been cloned.

@AlonDan
Copy link
Author

AlonDan commented Sep 22, 2020

I don't see any difference from what I did before, I did it again now, I get the same error:

chrome_2020-09-22_13-21-14

@woctezuma
Copy link

So you moved the files, or your renamed your directory?

Because if you moved the files, you might have forgotten to copy a hidden .git/ folder.

@AlonDan
Copy link
Author

AlonDan commented Sep 22, 2020

I just made the path shorter by moving from Z:/GANspace/ganspace
to Z:/GANspace

I didn't mess with anything beside CUT > PAST from the subdirectory to to Z:/GANspace
All the rest of the steps works great, only this step is... not, I'm very confused to be honest.

But thank you for trying to help, I appreciate it 👍

@woctezuma
Copy link

In your screenshot above, cd did not work, so you are still in the parent folder.

@woctezuma
Copy link

woctezuma commented Sep 22, 2020

You need to try git status. If you see an error message, then git does not manage your folder.

git clone https://github.com/harskish/ganspace

cd ganspace

git status

@AlonDan
Copy link
Author

AlonDan commented Sep 22, 2020

You need to try git status. If you see an error message, then git does not manage your folder.

I guess I do get that same error:
cmd_2020-09-22_13-26-08

Do I need to do everything from start?
if so... how do I NOT get this error again?

@woctezuma
Copy link

woctezuma commented Sep 22, 2020

You need to cd into the cloned directory.

In the worst case scenario, you could always work with Google Colab instead of Windows. The command-line in Windows is always awkward to me.

@AlonDan
Copy link
Author

AlonDan commented Sep 22, 2020

I don't understand, I'm inside the cloned directory: Z:\GANspace

As you can see all the files from git clone are there:
explorer_2020-09-22_13-18-18

@woctezuma
Copy link

woctezuma commented Sep 22, 2020

It is weird. The clone directory should be at Z:\GANSpace\ganspace.

@AlonDan
Copy link
Author

AlonDan commented Sep 22, 2020

I didn't realize that different path will make such a mess, it worked other github projects I tried.
I guess I'll have to redo all from the bringing, this time without make the path shorter... I didn't know it will not work because of that shortcut, all other steps worked fine.

@woctezuma
Copy link

woctezuma commented Sep 22, 2020

Just make sure you get this working:

git clone https://github.com/harskish/ganspace

cd ganspace

git status

and then:

git submodule update --init --recursive

You can try on a Google Colab machine. https://colab.research.google.com

@AlonDan
Copy link
Author

AlonDan commented Sep 22, 2020

I'm not a big fan of Google Colab, that's why I try on windows if possible but thanks for your patience and help, I appreciate it a lot :)

So, there is a progress, I re-do this as you explain:
cmd_2020-09-22_13-37-28

I tried the first test: python interactive.py --model=BigGAN-512 --class=husky --layer=generator.gen_z -n=1_000_000

It's loading for few seconds, and WORKS! :)

So... the lesson is ALWAYS leave the original subdirectory and not try to do shortcuts I guess...

Thank you once again for helping me, you rocks!

@woctezuma
Copy link

woctezuma commented Sep 22, 2020

Yes, in case of issue, always aim for a minimal working example. Sometimes, that is how you find the solution.

DataStrategist added a commit to DataStrategist/ganspace that referenced this issue Mar 18, 2021
I noticed that after I created the environment, I was still in the base folder (I never came into the newly cloned folder), so adding that step. This resolves the "not a git" errors some people are complaining about, for example harskish#10 harskish#16 harskish#39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants