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

torch.linalg_cholesky error #2

Open
hjf1997 opened this issue Mar 24, 2022 · 7 comments
Open

torch.linalg_cholesky error #2

hjf1997 opened this issue Mar 24, 2022 · 7 comments

Comments

@hjf1997
Copy link

hjf1997 commented Mar 24, 2022

Thanks for your kind work

I'm running you code at nonstat_gp_cat. However, the code constantly throws an error:

torch.linalg_cholesky: The factorization could not be completed because the input is not positive-definite (the leading minor of order 314 is not positive-definite).

It seems that you have code to reinitialize all the parameters at gp_train.py:

        # except Exception as e:
        #     loss_val = np.inf
        #     torch.cuda.manual_seed(rand)
        #     rand+=1
        #     init_vars(model)
            pprint('Iter', i, 'Batch', bi, 'Failed with', e, 're inited the params')
            # break

I also tried this for many time, but the model still cannot get the right initializations. This reinitialization of all the parameters is the only way to solve this problem? Do you have other suggestions?

Thanks in advance :)

@hjf1997
Copy link
Author

hjf1997 commented Mar 26, 2022

Hi, are you here?

@patel-zeel
Copy link
Owner

Hi @hjf1997. Sorry for not replying earlier as I missed the notification. Are you trying to use gp_train.py for your own dataset?

@hjf1997
Copy link
Author

hjf1997 commented Apr 4, 2022

Hi @patel-zeel No, I'm using the same Beijing Airquality dataset processed by your .jupyter file.
Besides the 'not positive-definite' error, I also met some nan errors during backpropagation.
Did you also meet this error?

@patel-zeel
Copy link
Owner

patel-zeel commented Apr 4, 2022

Yes, we got those errors earlier but they depend on way too many things. To help you better (and to solve potential bugs in our code), would you like to explain step by step the bare minimum process you tried so that I can reproduce the error (I'd appreciate a direct code that I can execute and hopefully see the same error as you are seeing)? please also share the torch and gpytorch versions you have used.

@hjf1997
Copy link
Author

hjf1997 commented Apr 4, 2022

OK, thanks for your kind help. I will first try to fix the problem and will give you feedback in a few days if there is any problem.

@hjf1997
Copy link
Author

hjf1997 commented Apr 23, 2022

BTW, will you release the processing code for the London dataset?

@tiantian0612
Copy link

hello,do you meet "No module named 'nsgp'"error?
running lib.py,there is a bug:
from nsgp.utils.inducing_functions import f_kmeans, f_random
ModuleNotFoundError: No module named 'nsgp'

Can you tell me how to solve it?Thank you

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