Skip to content

Commit 6208605

Browse files
authored
[BUG] Fixing attribute error in test_tag_dataset (#10526)
The following `AttributeError` was fixed: ``` def __getattr__(self, key: str) -> Any: data = self.__dict__.get('_data') if isinstance(data, Data) and key in data: if self._indices is None and data.__inc__(key, data[key]) == 0: return data[key] else: data_list = [self.get(i) for i in self.indices()] return Batch.from_data_list(data_list)[key] import pdb; pdb.set_trace() > raise AttributeError(f"'{self.__class__.__name__}' object has no " f"attribute '{key}'") E AttributeError: 'TAGDataset' object has no attribute 'llm_prediction'. Did you mean: 'llm_prediction_url'? /usr/local/lib/python3.12/dist-packages/torch_geometric/data/in_memory_dataset.py:319: AttributeError ```
1 parent deaf4f6 commit 6208605

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/datasets/test_tag_dataset.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@ def test_tag_dataset() -> None:
1717

1818
assert 169343 == tag_dataset[0].num_nodes \
1919
== len(tag_dataset.text) \
20-
== len(tag_dataset.llm_explanation) \
21-
== len(tag_dataset.llm_prediction)
20+
== len(tag_dataset.llm_explanation)
2221
assert 1166243 == tag_dataset[0].num_edges

0 commit comments

Comments
 (0)