Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue in running the code #92

Closed
jeffreyhusc opened this issue Dec 29, 2021 · 2 comments
Closed

issue in running the code #92

jeffreyhusc opened this issue Dec 29, 2021 · 2 comments

Comments

@jeffreyhusc
Copy link

Traceback (most recent call last):
File "/Users/sirihu/.conda/envs/envcwn/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/sirihu/.conda/envs/envcwn/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/sirihu/data/cwn/exp/run_mol_exp.py", line 105, in
exp_main(passed_args)
File "/Users/sirihu/data/cwn/exp/run_mol_exp.py", line 26, in exp_main
curves = main(parsed_args)
File "/Users/sirihu/data/cwn/exp/run_exp.py", line 90, in main
train_loader = DataLoader(dataset.get_split('train'), batch_size=args.batch_size,
File "/Users/sirihu/data/cwn/data/datasets/dataset.py", line 370, in get_split
if self.indices is not None:
AttributeError: 'OGBDataset' object has no attribute 'indices'

def get_split(self, split):
if split not in ['train', 'valid', 'test']:
raise ValueError(f'Unknown split {split}.')
idx = self.get_idx_split()[split]
if idx is None:
raise AssertionError("No split information found.")
370: if self.indices is not None:
raise AssertionError("Cannot get the split for a subset of the original dataset.")
return self[idx]

@crisbodnar
Copy link
Collaborator

crisbodnar commented Dec 30, 2021

Can you please provide the exact command you used and all the context for us to be able to debug? Are you using the version of the libraries specified in our requirements file? Did you make any modifications to the code? Based on the error, it seems you are trying to further split one of the train, test or validation splits.

For reference, I have just followed the README instructions on a clean machine and ran a couple of epochs of training on OGB-MOLHIV without any problems using sh exp/scripts/cwn-molhiv-small.sh.

@crisbodnar
Copy link
Collaborator

crisbodnar commented Jan 7, 2022

Hi @jeffreyhusc! We have spotted a problem with the dependencies when using CUDA-based libraries. This has been solved in PR #94 and might have caused the issues you observed. Please try running the code again by following the latest installation instructions from the README.

I will be closing this issue now, but feel free to reopen it if this problem shows up again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants