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

Latest setuptools 70.0.0 not compatible with nerfstudio after running pip install --upgrade pip setuptools #3159

Open
abrahamezzeddine opened this issue May 23, 2024 · 0 comments

Comments

@abrahamezzeddine
Copy link

abrahamezzeddine commented May 23, 2024

Describe the bug
Latest setuptools 70.0.0 is not compatible with nerfstudio and generates an error when a training is initiated.

Traceback (most recent call last):
File "C:\Users\hu.conda\envs\nerfstudio\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\hu.conda\envs\nerfstudio\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\hu.conda\envs\nerfstudio\Scripts\ns-train.exe_main
.py", line 7, in
File "C:\nerf\nerfstudio\nerfstudio\scripts\train.py", line 262, in entrypoint
main(
File "C:\nerf\nerfstudio\nerfstudio\scripts\train.py", line 247, in main
launch(
File "C:\nerf\nerfstudio\nerfstudio\scripts\train.py", line 189, in launch
main_func(local_rank=0, world_size=world_size, config=config)
File "C:\nerf\nerfstudio\nerfstudio\scripts\train.py", line 100, in train_loop
trainer.train()
File "C:\nerf\nerfstudio\nerfstudio\engine\trainer.py", line 261, in train
loss, loss_dict, metrics_dict = self.train_iteration(step)
File "C:\nerf\nerfstudio\nerfstudio\utils\profiler.py", line 112, in inner
out = func(*args, **kwargs)
File "C:\nerf\nerfstudio\nerfstudio\engine\trainer.py", line 496, in train_iteration
_, loss_dict, metrics_dict = self.pipeline.get_train_loss_dict(step=step)
File "C:\nerf\nerfstudio\nerfstudio\utils\profiler.py", line 112, in inner
out = func(*args, **kwargs)
File "C:\nerf\nerfstudio\nerfstudio\pipelines\base_pipeline.py", line 301, in get_train_loss_dict
model_outputs = self._model(ray_bundle) # train distributed data parallel model if world_size > 1
File "C:\Users\hu.conda\envs\nerfstudio\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "C:\Users\hu.conda\envs\nerfstudio\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "C:\nerf\nerfstudio\nerfstudio\models\base_model.py", line 143, in forward
return self.get_outputs(ray_bundle)
File "C:\nerf\nerfstudio\nerfstudio\models\splatfacto.py", line 738, in get_outputs
self.xys, depths, self.radii, conics, comp, num_tiles_hit, cov3d = project_gaussians( # type: ignore
File "C:\Users\hu.conda\envs\nerfstudio\lib\site-packages\gsplat\project_gaussians.py", line 61, in project_gaussians
return _ProjectGaussians.apply(
File "C:\Users\hu.conda\envs\nerfstudio\lib\site-packages\torch\autograd\function.py", line 539, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
File "C:\Users\hus.conda\envs\nerfstudio\lib\site-packages\gsplat\project_gaussians.py", line 110, in forward
) = C.project_gaussians_forward(
File "C:\Users\hu.conda\envs\nerfstudio\lib\site-packages\gsplat\cuda_init
.py", line 7, in call_cuda
from ._backend import _C
File "C:\Users\hu.conda\envs\nerfstudio\lib\site-packages\gsplat\cuda_backend.py", line 8, in
from torch.utils.cpp_extension import get_build_directory, load
File "C:\Users\hu.conda\envs\nerfstudio\lib\site-packages\torch\utils\cpp_extension.py", line 28, in
from pkg_resources import packaging # type: ignore[attr-defined]
ImportError: cannot import name 'packaging' from 'pkg_resources' (C:\Users\hu.conda\envs\nerfstudio\lib\site-packages\pkg_resources_init
.py)

To Reproduce
Do pip install --upgrade pip setuptools to upgrade to setuptools 70.0.0

Expected behavior
Training proceeding accordingly.

Additional context
Issue is solved by downgrading setuptools to pip install setuptools==69.x.x such as 69.5.1
After that everything will work again.

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

1 participant