You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is no convention for which device the data is stored when a function, e.g., fit(), is called. For example, even though the computation device to use is cuda, the input graph may not be on the GPU and will need to be transferred later after subsampling the neighborhoods for mini-batch training. This inconsistency causes many issues for development.
One naive solution is to call tensor.to(device) using the correct device every time a computation is being performed, which is certainly unsatisfactory and makes the code base not as clean.
Solution
By default, all data should sit on cpu
When a compute function, e.g., fit(), is called, perform any necessary device conversion inside that function.
The only exceptions are predict() and score(), which can be more flexible, since they will be used in various places with various configurations, e.g., training on GPU with mini-batch training and evaluating on CPU with full-batch.
The following PR is a corresponding example of fixing the issue: #30
Problem
Currently, there is no convention for which device the data is stored when a function, e.g.,
fit()
, is called. For example, even though the computation device to use iscuda
, the input graph may not be on the GPU and will need to be transferred later after subsampling the neighborhoods for mini-batch training. This inconsistency causes many issues for development.One naive solution is to call
tensor.to(device)
using the correct device every time a computation is being performed, which is certainly unsatisfactory and makes the code base not as clean.Solution
cpu
fit()
, is called, perform any necessary device conversion inside that function.predict()
andscore()
, which can be more flexible, since they will be used in various places with various configurations, e.g., training on GPU with mini-batch training and evaluating on CPU with full-batch.The following PR is a corresponding example of fixing the issue: #30
Need to check
The text was updated successfully, but these errors were encountered: