TensorKit.jl icon indicating copy to clipboard operation
TensorKit.jl copied to clipboard

Undefined constructor.

Open Gertian opened this issue 1 year ago • 4 comments

Hi,

I'm using the AD extension of TensorKit and ran into some problems due to this line : https://github.com/Jutho/TensorKit.jl/blob/419f88cb25bdbd3698606990f9f4cd131156f0c4/ext/TensorKitChainRulesCoreExt/constructors.jl#L25

From what I understand the tol kwarg has been removed from the basic functionality of TensorKit ?

Probably it's fair to just remove this ?

Gertian avatar Sep 26 '24 09:09 Gertian

I did not really have the time to go into this in more detail, but I think you are getting a bit confused because of the versions. The master might not have this anymore, but the latest released version definitely does: see here

I did notice that it seems like that constructor only exists for ProductSpace arguments for codomain and domain, and does not have the automatic conversion behavior that the other constructors have to automatically turn a VectorSpace into a ProductSpace{S,1} etc. It might be that this is what is causing you issues? Alternatively, that function is definitely only defined for DenseArray subtypes, so that might also be what's going on.

For future reference, it is definitely useful to include additional information in your issues. If you just point at a single line, it is very hard to figure out what is going wrong, since I don't know what you were running, what the error message was, what the problems are etc. Basically, I am just wildly guessing what might have gone wrong, or what might have been overlooked, or what are common mistakes (on both our sides). Additionally, sometimes you might have an idea of where it is going wrong, but if this turns out to be not entirely true it becomes very hard to debug the issue :wink:

lkdvos avatar Sep 30 '24 12:09 lkdvos

Hi Lukas,

I was indeed running this on the master which might have caused the issue. I'll try this again on the latest release to see if the problem persists.

As for the remainder of your message. I'm sorry, I keep messing this up indeed. Should I make it a habbit of ALWAYS including a full stack trace ?

Gertian avatar Oct 01 '24 07:10 Gertian

I think this discourse post actually summarizes quite well how to get help asap 😉

lkdvos avatar Oct 01 '24 17:10 lkdvos

Maybe we should include this in the default text when opening new issues.

Jutho avatar Oct 01 '24 19:10 Jutho