Comments (4)
That has to be it, library differences. I just cloned the repo and ran bash run_proteins.sh
as it is. Funny enough, with n_workers=0
I am using only 3GB of memory.
Anyways, it seems that now I can run your experiments, with the only difference that I am not using BatchSampler, but I guess it is enough to set shuffle=true
in NodeDataLoader
to obtain the same effect.
I will close the issue and open a new one if I find myself into more problems.
Thanks for the help!
from how_attentive_are_gats.
Hi @adrianjav!
The error you describe happens when you feed the BatchNorm layer with batchsize=1.
In this case, that means that there is only one subgarph:
how_attentive_are_gats/proteins/proteins_exp.py
Lines 90 to 96 in b5ccb61
Since you removed the batch sampler, you probably damaged this logic.
I guess that the solution will be to replace the following in proteins_exp.py
- from dgl.dataloading.pytorch import NodeDataLoader
+ from dgl.dataloading import DataLoader
lines 159-157:
+ train_dataloader = DataLoader(
- train_dataloader = DataLoaderWrapper(
- NodeDataLoader(
graph.cpu(),
train_idx.cpu(),
train_sampler,
- batch_sampler=BatchSampler(len(train_idx), batch_size=train_batch_size),
+ batch_size=train_batch_size,
num_workers=4,
- )
)
lines 171-179:
+ eval_dataloader = DataLoader(
- eval_dataloader = DataLoaderWrapper(
- NodeDataLoader(
graph.cpu(),
torch.cat([train_idx.cpu(), val_idx.cpu(), test_idx.cpu()]),
eval_sampler,
- batch_sampler=BatchSampler(graph.number_of_nodes(), batch_size=32768),
+ batch_size=32768,
num_workers=4,
- )
)
Please update me on how it goes!
from how_attentive_are_gats.
Thanks for the prompt reply.
Quite an oversight on my side. I added the batch size, but I was still running on problems regarding the memory usage. I fixed it doing the following (running at the moment, but it seems ok).
+ train_dataloader = NodeDataLoader(
- train_dataloader = DataLoaderWrapper(
- NodeDataLoader(
graph.cpu(),
train_idx.cpu(),
train_sampler,
- batch_sampler=BatchSampler(len(train_idx), batch_size=train_batch_size),
+ batch_size=train_batch_size,
- num_workers=4,
+ num_workers=0,
- )
)
Out of curiosity: What were the specs of the machine you used for the experiments? I am using a V100 with 16GB of RAM, and with 2 workers, memory usage skyrocketed to 14GB in 10seconds.
from how_attentive_are_gats.
We also used V100 with 16GB of RAM.
I don't know how the changes in the new version of DGL affect memory usage (if any at all).
Please have a look at the arguments in run_proteins.sh and the default arguments in proteins_exp.py which were used for our experiments:
how_attentive_are_gats/proteins/proteins_exp.py
Lines 260 to 283 in b5ccb61
Maybe you use other hyperparameters that affect memory usage.
from how_attentive_are_gats.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from how_attentive_are_gats.