torch-points3d icon indicating copy to clipboard operation
torch-points3d copied to clipboard

Error during intialization

Open de-gozaru opened this issue 3 years ago • 2 comments

Hi,

I'm using torch-points3d version 1.3.0. I'm trying to initialize KPConv model using the following:

from torch_points3d.applications.kpconv import KPConv

unet = KPConv(
            architecture="unet",
            input_nc=0,
            num_layers=4,
            in_grid_size=0.03,
             )

however, I got the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/my_path/.virtualenvs/name/lib/python3.8/site-packages/torch_points3d/applications/kpconv.py", line 48, in KPConv
    return factory.build()
  File "/my_path/.virtualenvs/name/lib/python3.8/site-packages/torch_points3d/applications/modelfactory.py", line 73, in build
    return self._build_unet()
  File "/my_path/.virtualenvs/name/lib/python3.8/site-packages/torch_points3d/applications/kpconv.py", line 60, in _build_unet
    return KPConvUnet(model_config, None, None, modules_lib, **self.kwargs)
  File "/my_path/.virtualenvs/name/lib/python3.8/site-packages/torch_points3d/applications/kpconv.py", line 77, in __init__
    super(BaseKPConv, self).__init__(model_config, model_type, dataset, modules)
  File "/my_path/.virtualenvs/name/lib/python3.8/site-packages/torch_points3d/models/base_architectures/unet.py", line 363, in __init__
    self._init_from_compact_format(opt, model_type, dataset, modules_lib)
  File "/my_path/.virtualenvs/name/lib/python3.8/site-packages/torch_points3d/models/base_architectures/unet.py", line 410, in _init_from_compact_format
    self.save_sampling_id = opt.down_conv.save_sampling_id
  File "/my_path/.virtualenvs/name/lib/python3.8/site-packages/omegaconf/dictconfig.py", line 353, in __getattr__
    self._format_and_raise(
  File "/my_path/.virtualenvs/name/lib/python3.8/site-packages/omegaconf/base.py", line 190, in _format_and_raise
    format_and_raise(
  File "/my_path/.virtualenvs/name/lib/python3.8/site-packages/omegaconf/_utils.py", line 821, in format_and_raise
    _raise(ex, cause)
  File "/my_path/.virtualenvs/name/lib/python3.8/site-packages/omegaconf/_utils.py", line 719, in _raise
    raise ex.with_traceback(sys.exc_info()[2])  # set end OC_CAUSE=1 for full backtrace
  File "/my_path/.virtualenvs/name/lib/python3.8/site-packages/omegaconf/dictconfig.py", line 351, in __getattr__
    return self._get_impl(key=key, default_value=_DEFAULT_MARKER_)
  File "/my_path/.virtualenvs/name/lib/python3.8/site-packages/omegaconf/dictconfig.py", line 438, in _get_impl
    node = self._get_node(key=key, throw_on_missing_key=True)
  File "/my_path/.virtualenvs/name/lib/python3.8/site-packages/omegaconf/dictconfig.py", line 470, in _get_node
    raise ConfigKeyError(f"Missing key {key}")
omegaconf.errors.ConfigAttributeError: Missing key save_sampling_id
    full_key: down_conv.save_sampling_id
    object_type=dict

The same code was working with a previous version I installed 1 year ago.

What I'm doing wrong? your help is appreciated!

Thank you!

de-gozaru avatar Dec 24 '21 11:12 de-gozaru

Hi, it looks like you may be using an outdated version of the code. I think you'll find the issue won't happen if you update to the latest master branch. Let me know if it helps!

CCInc avatar Jan 03 '22 18:01 CCInc

Hi,

Thank you for your response. Actually, I think I'm using the latest version, I just installed the library one month ago.

de-gozaru avatar Jan 19 '22 18:01 de-gozaru