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
File "/path_to_python3.9/site-packages/fast_l1-0.0.1-py3.9.egg/fast_l1/regressor.py", line 221, in train_saga
RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)
or
File "/path_to_python3.9/site-packages/fast_l1-0.0.1-py3.9.egg/fast_l1/regressor.py", line 341, in train_saga
RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)
This happened because in lines 221 and 341 of regressor.py some CPU tensors are being indexed/sliced using other tensors that lie on the GPU, in this case, idx and still_opt_outer:
Dear authors,
Thank you for releasing
fast_l1
code together withdatamodels
.While running the linear regression step of datamodels, I faced an issue regarding tensors not being in the same device.
After running
I would face something similar to
or
This happened because in lines
221
and341
ofregressor.py
some CPU tensors are being indexed/sliced using other tensors that lie on the GPU, in this case,idx
andstill_opt_outer
:fast_l1/fast_l1/regressor.py
Lines 221 to 222 in ef7d08d
fast_l1/fast_l1/regressor.py
Line 341 in ef7d08d
On the other hand, they are both on the GPU because
weight
andtrain_loader
in datamodels/datamodels/regression/compute_datamodels.py are on the GPU whentrain_saga
is called:The text was updated successfully, but these errors were encountered: