shauli-ravfogel / nullspace_projection

MIT License
87 stars 21 forks source link

requirements version number #7

Closed veronica320 closed 2 years ago

veronica320 commented 2 years ago

Hi,

Thanks again for your great work! Is it possible to provide the version number of packages in requirements.txt (as well as that of scipy)?

The reason is that I'm having an "SVD did not converge" error when running debias.py, after a few iterations:

  File "debias.py", line 140, in get_debiasing_projection
    P = get_projection_to_intersection_of_nullspaces(rowspace_projections, input_dim)
  File "debias.py",  line 44, in get_projection_to_intersection_of_nullspaces
    P = I - get_rowspace_projection(Q)
  File "debias.py",  line 24, in get_rowspace_projection
    w_basis = scipy.linalg.orth(W.T)  # orthogonal basis
  File "env/lib/python3.7/site-packages/scipy/linalg/decomp_svd.py", line 323, in orth
    u, s, vh = svd(A, full_matrices=False)
  File "env/lib/python3.7/site-packages/scipy/linalg/decomp_svd.py", line 132, in svd
    raise LinAlgError("SVD did not converge")
numpy.linalg.LinAlgError: SVD did not converge

I checked a lot of StackOverflow posts/Github issues, and ruled out a few common causes (W doesn't have any NaN value in it; numpy/scipy version is the latest version, ...), but didn't solve the problem. One possible remaining cause is that I'm not using the exact same version of numpy and scipy as you did.

Any input is appreciated. Thanks!

veronica320 commented 2 years ago

Fixed by this. Thanks anyway!