CausalDiscoveryToolbox icon indicating copy to clipboard operation
CausalDiscoveryToolbox copied to clipboard

SAM with prior knowledge graph and customly set hyperparameters always returns "All solutions contain NaNs" assertion error.

Open antsaukk opened this issue 3 years ago • 4 comments

Hi,

I have done some hp optimization for SAM and it did yield an increase in performance. I wanted to go further and introduced prior knowledge graph (pkg later). However, when I am trying to run SAM with pkg and optimized hp, it always yields AssertionError: "All solutions contains NaNs" and AttributeError: "'Tensor' object has no attribute 'astype'". I have tried to experiment running SAM with different set of hp and pkg and find out that when hp "nruns=1" is set, the errors are arising. I have fed the pck as networkx.DiGraph and networkx.Graph objects -- in both cases it seems to yield the same assertion errors. What could be the reason for such behavior?

Best, Anton

antsaukk avatar May 05 '22 08:05 antsaukk

Hello, This issue often arises when the GAN does not converge, I think you may need to tweak the parameters of the GAN to make the optimization more smooth. what are the

Thing is, we are utilizing multiprocessing to optimize the compute-time so the issues raises only when n_jobs=1 or n_runs=1.

The Attribute error is concerning however, do you have the full error trace of that error ?

Thanks for the help, Best, Diviyan

diviyank avatar May 19 '22 15:05 diviyank

hello Diviyan: When I was inputting parameters, I also encountered this type of problem. The following is my running code and specific error information. dd60a73790425176bad0133d4b4fa5e 01cdde9b5bb27b19e6ba18a452b83a8 Looking forward to your reply very much! Best Christopher

Christopher7622 avatar Dec 18 '23 07:12 Christopher7622

Hello @Christopher7622 , I think your problem arises with package versions, could you try using the docker image to execute the code?

Best, Diviyan

diviyank avatar Dec 18 '23 11:12 diviyank

Hello @Christopher7622 , I think your problem arises with package versions, could you try using the docker image to execute the code?

Best, Diviyan

thanks a lot,An hour ago, I ran the program again according to the example provided in the official document. Although an error occurred, the program continued to run on the server. What is the reason for this? image

Christopher7622 avatar Dec 18 '23 11:12 Christopher7622