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

Running time #44

Open
SwiderCharlie opened this issue Jul 24, 2021 · 2 comments
Open

Running time #44

SwiderCharlie opened this issue Jul 24, 2021 · 2 comments

Comments

@SwiderCharlie
Copy link

Hello!
I ran the code with the following command:
python run.py --graph_size 20 --baseline rollout --run_name 'tsp20_rollout' --val_dataset data/tsp/tsp20_validation_seed4321.pkl
but an epoch took nearly 3 hours.
I ran the code on a single GPU(Nvidia Tesla V100S ) and I verified that opts.device is indeed cuda:0. What is the reason for this?
Thanks in advance!

@zbh888
Copy link

zbh888 commented Nov 11, 2022

I met the same issue.

@wouterkool
Copy link
Owner

Please have a look at #11, I'll copy it here:

Hi, I had the same issue, and here is how I solved it:
Turns out this is related to the num_workers=1. If you change it to num_workers=0 the code will run properly. This is in line 78 of 'train.py':
training_dataloader = DataLoader(training_dataset, batch_size=opts.batch_size, num_workers=1)
At first, I thought this is because of 'enumerate', but it is not.
I hope this solves it for you.
Cheers

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

3 participants