Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

array must not contain infs or NaNs #77

Open
ksrinivas007 opened this issue Feb 18, 2021 · 2 comments
Open

array must not contain infs or NaNs #77

ksrinivas007 opened this issue Feb 18, 2021 · 2 comments

Comments

@ksrinivas007
Copy link

Hi Guys
I am getting this numpy error
Computing principal components 0% [######] 100% | ETA: 00:00:00 Total time elapsed: 00:00:01 Traceback (most recent call last): File "run.py", line 71, in <module> run_experiment(model_name, dataset_dir, embedding_dir) File "run.py", line 16, in run_experiment datasets = dm.data.process(path=dataset_dir, File "/root/anaconda3/lib/python3.8/site-packages/deepmatcher/data/process.py", line 208, in process datasets = MatchingDataset.splits( File "/root/anaconda3/lib/python3.8/site-packages/deepmatcher/data/dataset.py", line 581, in splits datasets[0].compute_metadata(train_pca) File "/root/anaconda3/lib/python3.8/site-packages/deepmatcher/data/dataset.py", line 291, in compute_metadata svd.fit(concatenated.numpy()) File "/root/anaconda3/lib/python3.8/site-packages/sklearn/decomposition/_truncated_svd.py", line 143, in fit self.fit_transform(X) File "/root/anaconda3/lib/python3.8/site-packages/sklearn/decomposition/_truncated_svd.py", line 178, in fit_transform U, Sigma, VT = randomized_svd(X, self.n_components, File "/root/anaconda3/lib/python3.8/site-packages/sklearn/utils/extmath.py", line 354, in randomized_svd Uhat, s, V = linalg.svd(B, full_matrices=False) File "/root/anaconda3/lib/python3.8/site-packages/scipy/linalg/decomp_svd.py", line 106, in svd a1 = _asarray_validated(a, check_finite=check_finite) File "/root/anaconda3/lib/python3.8/site-packages/scipy/_lib/_util.py", line 263, in _asarray_validated a = toarray(a) File "/root/anaconda3/lib/python3.8/site-packages/numpy/lib/function_base.py", line 485, in asarray_chkfinite raise ValueError( ValueError: array must not contain infs or NaNs

Any suggestions please ?
Thanks
Sreeni

@sidharthms
Copy link
Collaborator

Is it possible to convert your code into a Colab notebook and share so I can take a look?

@tidianelyahmed
Copy link

Hi Guys
Did you solve this numpy error?
I have the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants