Graph-Trans icon indicating copy to clipboard operation
Graph-Trans copied to clipboard

About environment

Open ninethyou opened this issue 1 year ago • 0 comments

$python run.py --seed 1024
--model_scale middle
--data_name flickr \ --use_super_node True
--node_level_modules eig,svd \ --attn_mask_modules 1hop
--sampling_algo shadowkhop
--depth 2
--num_neighbors 10

When I run the above command, I get an error. ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /tf/Graph-Trans-main/run.py:359 in │ │ │ │ 356 │ │ eval_dataset=valid_set, │ │ 357 │ │ compute_metrics=compute_metrics, │ │ 358 │ │ data_collator=lambda x:collator(x,args), │ │ ❱ 359 │ │ callbacks=[MyCallback,EarlyStoppingCallback(early_stopping_pat │ │ 360 │ ) │ │ 361 │ trainer.args._n_gpu=1 │ │ 362 │ │ │ │ /opt/conda/lib/python3.7/site-packages/transformers/trainer.py:579 in │ │ init │ │ │ │ 576 │ │ if args.max_steps > 0: │ │ 577 │ │ │ logger.info("max_steps is given, it will override any val │ │ 578 │ │ │ │ ❱ 579 │ │ if train_dataset is not None and not has_length(train_dataset │ │ 580 │ │ │ raise ValueError( │ │ 581 │ │ │ │ "The train_dataset does not implement len, max_st │ │ 582 │ │ │ │ "The number of steps needs to be known in advance for │ │ │ │ /opt/conda/lib/python3.7/site-packages/transformers/trainer_utils.py:592 in │ │ has_length │ │ │ │ 589 │ Checks if the dataset implements len() and it doesn't raise an │ │ 590 │ """ │ │ 591 │ try: │ │ ❱ 592 │ │ return len(dataset) is not None │ │ 593 │ except TypeError: │ │ 594 │ │ # TypeError: len() of unsized object │ │ 595 │ │ return False │ │ │ │ /opt/conda/lib/python3.7/site-packages/torch_geometric/data/dataset.py:242 │ │ in len │ │ │ │ 239 │ │ │ 240 │ def len(self) -> int: │ │ 241 │ │ r"""The number of examples in the dataset.""" │ │ ❱ 242 │ │ return len(self.indices()) │ │ 243 │ │ │ 244 │ def getitem( │ │ 245 │ │ self, │ │ │ │ /opt/conda/lib/python3.7/site-packages/torch_geometric/data/dataset.py:100 │ │ in indices │ │ │ │ 97 │ │ │ self._process() │ │ 98 │ │ │ 99 │ def indices(self) -> Sequence: │ │ ❱ 100 │ │ return range(self.len()) if self._indices is None else self._i │ │ 101 │ │ │ 102 │ @property │ │ 103 │ def raw_dir(self) -> str: │ ╰──────────────────────────────────────────────────────────────────────────────╯ AttributeError: 'Graphtrans_Sampling_Dataset' object has no attribute '_indices'

I keep getting a bunch of little errors when I load the data, and I think I have the wrong version. Can you tell me which version I can run?

ninethyou avatar Aug 17 '23 06:08 ninethyou