graphnet-team / graphnet

A Deep learning library for neutrino telescopes
https://graphnet-team.github.io/graphnet/
Apache License 2.0
85 stars 85 forks source link

Missing Declaration of Key Attributes for IceCubeKaggle #684

Closed ArturoLlorente closed 2 months ago

ArturoLlorente commented 3 months ago

Describe the bug When executing a script with the IceCubeKaggle detector class, it is observed that there is a lack of declaration for the geometry_table_path, xyz, string_id_column, and sensor_id_column. This, in turn, leads to an error when initializing the Dataset class around in line 299. The specific line causing the error is:

self._string_column = graph_definition._detector.string_index_name

This line redirects to the Detector class with the following method:

@property
  def string_index_name(self) -> str:
      """Public get method for retrieving the string index column name."""
      return self.string_id_column`

To Reproduce Run any optimization script with IceCubeKaggle detector class.

Expected behavior Upon calling Detector.string_index_name, the expected behavior is to obtain the name in the dataset referring to the string index.

Full traceback The full traceback is as follows:


Traceback (most recent call last):
  File "/remote/ceph/user/l/llorente/training/icemix_train_nugen.py", line 359, in <module>
    results = inference(
              ^^^^^^^^^^
  File "/remote/ceph/user/l/llorente/training/icemix_train_nugen.py", line 112, in inference
    test_dataloader = make_dataloader(
                      ^^^^^^^^^^^^^^^^
  File "/remote/ceph/user/l/llorente/graphnet/src/graphnet/training/utils.py", line 96, in make_dataloader
    dataset = SQLiteDataset(
              ^^^^^^^^^^^^^^
  File "/remote/ceph/user/l/llorente/graphnet/src/graphnet/utilities/config/dataset_config.py", line 248, in __call__
    created_obj = super().__call__(*args, **kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/remote/ceph/user/l/llorente/graphnet/src/graphnet/data/dataset/dataset.py", line 299, in __init__
    self._string_column = graph_definition._detector.string_index_name
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/iwsatlas1/llorente/.conda/envs/graphtorch2/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1688, in __getattr__
    raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'IceCubeKaggle' object has no attribute 'string_index_name'. Did you mean: 'sensor_index_name'?```