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

pyngp, ImportError on pyngp.cpython-37m-x86_64-linux-gnu.so: undefined symbol #950

Closed
smtabatabaie opened this issue Sep 15, 2022 · 18 comments

Comments

@smtabatabaie
Copy link

I'm trying to run it on Google Colab, and I'm following this guide:
https://github.com/NVlabs/instant-ngp/blob/master/notebooks/instant_ngp.ipynb
Everything builds without any errors, when I try to run the run.py code (which is the 8th step of the mentioned link) I get this error:

Traceback (most recent call last):
  File "scripts/run.py", line 29, in <module>
    import pyngp as ngp # noqa
ImportError: /content/instant-ngp/build/pyngp.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZNK3ngp7Testbed16crop_box_cornersEb

I saw this issue in which the compiler couldn't find pyngp and there was a suggestion to specify the build folder #43 , so I also tried adding the lines to specify the build folder in run.py, but still no luck.

pyngp_path = '\build'
sys.path.append(pyngp_path)
import pyngp as ngp  # this line should already be there near the top of the code

I'd appreciate it if someone could help me with this.

@domef
Copy link

domef commented Sep 16, 2022

I'm having the same problem.

@domef
Copy link

domef commented Sep 16, 2022

I just found out that instant-ngp/build/testbed works.

@smtabatabaie
Copy link
Author

I just found out that instant-ngp/build/testbed works.

Thanks @domef , you mean I should set my path to build/testbed in run.py?

@domef
Copy link

domef commented Sep 16, 2022

No, I mean that you can directly run instant-ngp/build/testbed, it is the equivalent of run.py but compiled from c++. (it should have about the same options). With testbed I'm able to train nerf on colab.

@domef
Copy link

domef commented Sep 16, 2022

I see now that testbed has many less options than run.py, but at the moment I think it's a good fallback.

Edit: there are few options in testbed , so actually it's pretty hard to work in headless mode. I can't even save a checkpoint or set the number of steps.

@smtabatabaie
Copy link
Author

That's unfortunate, If @andreykramer who's wrote the guide could help us it would be great.

@domef
Copy link

domef commented Sep 16, 2022

I think I will try to compile some older versions of instant-ngp and see if they work.

@domef
Copy link

domef commented Sep 16, 2022

I managed to run run.py and train on the fox dataset in headless mode by checking out the commit add notebook with guide for execution in colab : git checkout 50ed131f0e296801d4b3d09ff58295add2af42fa.

@smtabatabaie
Copy link
Author

T

I managed to run run.py and train on the fox dataset in headless mode by checking out the commit add notebook with guide for execution in colab : git checkout 50ed131f0e296801d4b3d09ff58295add2af42fa.

Thanks very much, saved my day!

@taruntiwar
Copy link

Can you please explain to me how you managed to run run.py in colab notebook
Thank you

@domef
Copy link

domef commented Sep 20, 2022

I followed the instructions in https://github.com/NVlabs/instant-ngp/blob/master/notebooks/instant_ngp.ipynb with the following branch 50ed131.

@domef
Copy link

domef commented Sep 21, 2022

I just verified that the last working commit is 25dec33c253f035485bb2e1f8563e12ef3134e8b.

@andreykramer
Copy link
Contributor

I just verified that the last working commit is 25dec33c253f035485bb2e1f8563e12ef3134e8b.

Thanks, this sure will be helpful to find out what's wrong.

That's unfortunate, If @andreykramer who's wrote the guide could help us it would be great.

Unfortunately I don't know this repo deeply enough to have a clue of what may have broken the compilation nor how to fix it in the guide.

@sumanttyagi
Copy link

i am also facing the same issue please guide me how to solve this problem ? to train the model ?

@domef
Copy link

domef commented Sep 23, 2022

I followed the instructions in https://github.com/NVlabs/instant-ngp/blob/master/notebooks/instant_ngp.ipynb with the following branch 50ed131.

Follow the instructions specified in the notebook but use the same commit I used.

@saisurbehera
Copy link

I get the same error with python with headless even with the branch

@akbazuka
Copy link

akbazuka commented Oct 2, 2022

Likewise, just tried to run it today and got issues with both of the suggested branches.

@SamDM SamDM mentioned this issue Oct 3, 2022
@SamDM
Copy link
Contributor

SamDM commented Oct 3, 2022

Hi, I made a PR which fixes this issue, in the meantime, see here: #991

@Tom94 Tom94 closed this as completed Oct 3, 2022
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

9 participants