-
Notifications
You must be signed in to change notification settings - Fork 12
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
Lost functionality with new way of handling init argument? #49
Comments
You are right that using types introduces limitations in the information that can be given to the parser.
type AA
X::Matrix{Float64}
y::Vector{Float64}
end
rdiff(:(sum(v.X * x + v.y)),
x=Vector{Float64},
v=AA,
ignore=:v)
rdiff(:(sum(X * x + y)),
x=Vector{Float64},
X=Matrix{Float64},
y=Vector{Float64},
ignore=[:X,:y]) Does that solve your problem or is it still problematic for your use case ? |
This one is a little more complicated. The interface relies on taking a second arbitrary user-defined argument of type |
@fredo-dedup I was thinking about this issue, and understand of course that using types limits the information that can be passed to the parser. Along these lines, I wanted to ask if it is possible to revert this breaking change; if we have to choose between one interface which limits the previously available functionality and an interface like the old one with richer functionality, I would prefer the latter, if this is ok with you. |
I am a bit reluctant to revert the change since it brings a lot of advantages both internally : differentiation code generation is faster and smaller, and externally : user does not have to provide actual values but only their type. Maintaining both possibilities (values or types) is also not very satisfactory since I still lose on the internal side of things. |
Thanks @fredo-dedup. I am afraid changing Klara's API is far from trivial, because there are so many inter-related components that must by satisfied concurrently (ReverseDiffSource and ForwardDiff compatibility being one), plus propagating a potential API change throughout the package is not the easiest task due to the extensive amount of code involved (besides, this would lead to yet another breakage of interface for users, as the interface at some point needs to settle to let the users make use of the package without frustrating them). In a nutshell, the main issue is the following; let's say we want to call the |
@fredo-dedup please excuse my persistence for trying to find a solution for this, but it is critical for me to fix it; firstly it breaks the relevant functionality of Klara, and secondly I need it for a project of my own (I submitted a paper for review to a journal, which was using ReverseDiffSource from Klara and I truly need this functionality desperately back in order to be able to run follow up simulations related to the manuscript). Is there any chance you can help me to create a clone of your repo with the appropriate code that allows the older richer functionality, associated with this issue, be invoked? If you could give me some instructions as to which are the relevant commits I need to invert in a cloned repo of ReverseDiffSource, I would be indebted; apologies in advance for the urgency of my query. |
Going back to v0.2.3 of ReverseDiffSource should do it, no ? Can't you change the require file of Klara to have an upper limit at 0.2.3 ? |
Brilliant, I will check this out in the next couple of days. Is ReverseDiffSource 0.2.3 compatible with Julia v0.5? |
Hi @fredo-dedup, I tried what you suggested, used version 0.2.3 of ReverseDiffSource with the latest version of Klara (0.7.0). It doesn't work still, the errors remain. Moreover, in relation to my question above, is v0.2.3 of ReverseDiffSouce meant to run with Julia v0.5 or Julia v0.4? Is there a way ReverseDiffSource could possibly provide a solution so that the relevant functionality of Klara relying on your package remains operational? Can you help maintain ReverseDiffSource as an integrated component of Klara, which is much desired and in some instances needed due to packages/projects depending on your package? Thanks for your attention to this issue. |
v0.2.3 is julia v0.4 only (it supported 0.5 pre release versions but not the final one). But i think that there must have been an operational version of klara that was working with this version of reversediffsource (what was the version of klara at the time of the release of v0.2.3 of reversediffsource ?). This version at least should work no ? |
Yes, @fredo-dedup, I will try to choose the right commits for ReverseDiffSource and Klara to have them working again together for the needs of my own project. I am very thankful that you are thinking of bringing back the old interface alongside the new one, as this will ensure longer term integration between ReverseDiffSource and Klara. The timeline for such sustainable delivered solution is not an issue at all (I can settle with the temporary solution you proposed for my own needs for now). It is more than enough to know that you are planning to tackle this matter and that it is in your high priority list, thank you very much for this. |
Hi @fredo-dedup, there is sth that stopped working with the recent change of interface for the
init
input argument ofrdiff()
. Say that I have an expression with two variablesx
andv
, of typesVector{Float64}
andVector{Any}
. This won't work anymore:In the past, it was possible to do sth along the lines:
Is there a solution that wouldn't require breaking the existing interface in Klara?
The text was updated successfully, but these errors were encountered: