Skip to content

Commit

Permalink
Improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nyLiao committed Jul 27, 2024
1 parent 73f33e6 commit 811d0bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions benchmark/trainer/load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def _resolve_import(self, args: Namespace) -> Tuple[str, str, dict]:
else:
self.metric = 's_f1i'
if self.data not in ['snap-patents']:
self._T_insert(T.ToUndirected(), index=0)
kwargs['transform'] = self._T_insert(T.ToUndirected(), index=0)
elif self.data in ['penn94', 'amherst41', 'cornell5', 'johns_hopkins55', 'reed98']:
module_name = 'dataset_process'
class_name = 'FB100'
Expand Down Expand Up @@ -202,7 +202,7 @@ def _resolve_import(self, args: Namespace) -> Tuple[str, str, dict]:
kwargs = dict(
root=DATAPATH.joinpath('PyG'),
name=self.data,
transform=self.transform,)
transform=self._T_insert(T.ToUndirected(), index=0),)
pyg_mapping = {
'cora': 'Planetoid',
'citeseer': 'Planetoid',
Expand Down
4 changes: 4 additions & 0 deletions benchmark/utils/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ def merge(self,
logger.data.index = rows
if suffix:
logger.data.columns = [f'{coli}_{suffix}' for coli in logger.data.columns]
logger.fmt.index = [f'{coli}_{suffix}' for coli in logger.fmt.index]

self._set(logger.data, logger.fmt)
return self
Expand Down Expand Up @@ -336,3 +337,6 @@ def get_str(self,
def __str__(self) -> str:
r"""String for print on screen."""
return self.get_str(maxlen=80)

def __repr__(self) -> str:
return self.get_str()
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pyg_spectral

| 🔍 `Documentation <https://gdmnl.github.io/Spectral-GNN-Benchmark/>`__
| 👾 `GitHub <https://github.com/gdmnl/Spectral-GNN-Benchmark/>`__ |gh-bn|
| 📄 `Paper <https://arxiv.org/abs/2106.06100>`__
| 📄 `Paper <https://arxiv.org/abs/2406.09675>`__
| 📎 `Citation <https://github.com/gdmnl/Spectral-GNN-Benchmark#misc>`__
``pyg_spectral`` is a `PyG <https://pyg.org>`_-based framework for analyzing, implementing, and benchmarking spectral GNNs with effectiveness and efficiency evaluations.
Expand Down

0 comments on commit 811d0bc

Please sign in to comment.