Dear authors,
I found that utils/so3.py automatically created running files even in the case of checking usage at https://github.com/gcorso/DiffDock/blob/main/utils/so3.py#L45:
if os.path.exists('.so3_omegas_array4.npy'):
_omegas_array = np.load('.so3_omegas_array4.npy')
_cdf_vals = np.load('.so3_cdf_vals4.npy')
_score_norms = np.load('.so3_score_norms4.npy')
_exp_score_norms = np.load('.so3_exp_score_norms4.npy')
else:
_eps_array = 10 ** np.linspace(np.log10(MIN_EPS), np.log10(MAX_EPS), N_EPS)
_omegas_array = np.linspace(0, np.pi, X_N + 1)[1:]
_exp_vals = np.asarray([_expansion(_omegas_array, eps) for eps in _eps_array])
_pdf_vals = np.asarray([_density(_exp, _omegas_array, marginal=True) for _exp in _exp_vals])
_cdf_vals = np.asarray([_pdf.cumsum() / X_N * np.pi for _pdf in _pdf_vals])
_score_norms = np.asarray([_score(_exp_vals[i], _omegas_array, _eps_array[i]) for i in range(len(_eps_array))])
_exp_score_norms = np.sqrt(np.sum(_score_norms**2 * _pdf_vals, axis=1) / np.sum(_pdf_vals, axis=1) / np.pi)
np.save('.so3_omegas_array4.npy', _omegas_array)
np.save('.so3_cdf_vals4.npy', _cdf_vals)
np.save('.so3_score_norms4.npy', _score_norms)
np.save('.so3_exp_score_norms4.npy', _exp_score_norms)
and at https://github.com/gcorso/DiffDock/blob/main/utils/torus.py#L31.
if os.path.exists('.p.npy'):
p_ = np.load('.p.npy')
score_ = np.load('.score.npy')
else:
p_ = p(x, sigma[:, None], N=100)
np.save('.p.npy', p_)
eps = np.finfo(p_.dtype).eps
score_ = grad(x, sigma[:, None], N=100) / (p_ + eps)
np.save('.score.npy', score_)
I think it will be better to run it only when we actually execute with inputs instead of importing. This situation creates files in unexpected directories just because users check usage.
Dear authors,
I found that
utils/so3.pyautomatically created running files even in the case of checking usage at https://github.com/gcorso/DiffDock/blob/main/utils/so3.py#L45:and at https://github.com/gcorso/DiffDock/blob/main/utils/torus.py#L31.
I think it will be better to run it only when we actually execute with inputs instead of importing. This situation creates files in unexpected directories just because users check usage.