zdhNarsil / GFlowNet-CombOpt

PyTorch implementation for our NeurIPS 2023 spotlight paper "Let the Flows Tell: Solving Graph Combinatorial Optimization Problems with GFlowNets".
50 stars 8 forks source link

Failed to read Error when running main.py #1

Closed aslacour closed 7 months ago

aslacour commented 1 year ago

Hi, I generated a dataset then tried to run main.py and am getting Failed to read errors followed by the paths of the graphs. I verified the paths specified exist and point to graph .gpickle files.

How might I resolve this issue?

zdhNarsil commented 1 year ago

Hi, I wonder if you could provide more specific description? (like what is the error message and how you generate the data)

aslacour commented 1 year ago

After following the instructions in README.md I get many of this error after executing main.py Failed to read /GFlowNet-CombOpt/data/rb200-300/train/GR_200_300_2085.gpickle.

followed by this

Error executing job with overrides: ['input=rb200-300', 'alg=fl', 'bsit=8'] Traceback (most recent call last): File "/GFlowNet-CombOpt/gflownet/main.py", line 150, in main train_loader, test_loader = get_data_loaders(cfg) File "/GFlowNet-CombOpt/gflownet/data.py", line 106, in get_data_loaders train_loader = DataLoader(trainset, batch_size=train_batch_size, File ".conda/envs/flow4/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 351, in __init__ sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type] File "/.conda/envs/flow4/lib/python3.9/site-packages/torch/utils/data/sampler.py", line 107, in __init__ raise ValueError("num_samples should be a positive integer " ValueError: num_samples should be a positive integer value, but got num_samples=0 Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Oliver-0423 commented 10 months ago

same issue

zdhNarsil commented 10 months ago

I hav not encountered this. Can you try re-generate the data files?

HanbumKo commented 8 months ago

I have solved with specific networkx version pip install networkx==2.5.0

zdhNarsil commented 7 months ago

Closing this issue as it is due to version mismatch.