-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[Do not Merge] Remove implicit pinvs of vectors #40758
base: master
Are you sure you want to change the base?
Conversation
@nanosoldier |
The base tests will need fixing to be in line and all green with this before we should run pkgeval. I kicked it off a bit too soon. |
Should be good now! |
Does marking this PR as draft prevent a nanosoldier run from triggering? |
Something went wrong when running your job:
|
@nanosoldier |
Your package evaluation job has completed - possible new issues were detected. A full report can be found here. cc @maleadt |
The following are real: Will take a look at some point to see which of these are overzealous testing vs real usage |
I had some preliminary look at this. DiffEqDevTools and QuantumOpticsBase look very much like bugs. Eg DiffEqDevTools has
which is a pretty strong argument for this PR :-) Will open issues there. RecordedArrays and DomainSets look like overzealous testing. I could not easily determine Indicators, MRIReco and QuantEcon, I'll try to investigate locally. Also this PR results in some infinite loops, we should probably just restrict to AbstractMatrix here:
|
@ChrisRackauckas Note the DiffeqDevTools issue here. |
Indicators, MRIReco (via NFFT) and QuantEcon are legitimate: they do |
So summing up, seven failures: one overzealous testing, two using |
We probably should make a definite decision here. I have marked it for linalg triage now, but I'm not sure it ever convened, so we might just want to regularly triage this? |
Should probably rebase to master and rerun pkgeval. |
Done. Let's see if I can summon? |
@nanosoldier |
Your package evaluation job has completed - possible new issues were detected. A full report can be found here. |
Nothing new here. To sum up, there's two methods here: 1 scalar / vector 2 vector / vector, which through fallbacks provides vector \ vector. 1 is not used in any package as far as I can see, and I have trouble seeing a use for it. It's very dangerous because of the possible confusion with scalar ./ vector (which is much more used): it also produces an array and so has the potential for silent corruption (as was found in several packages in the previous pkgeval run). It is the worst offender and should ideally be removed ASAP, if possible. Regarding 2, vector \ vector is legitimately used in packages for fitting one vector to another, which is nice and useful. vector / vector is much less useful. My guess is that this is because x \ y is overdetermined and simply defined as the scalar a that minimizes ||x-a y||, whereas x / y is undetermined and is defined as the matrix that minimizes ||x - A y|| and has minimal norm. I think we should definitely do 1 ASAP. Regarding 2, we could leave it as is, remove only vector / vector, or also remove vector \ vector. I would be in favor of removing both of them. The rule would then be that vectors are never pseudo-inverted implicitly and have to be converted to matrices. The deprecation would be from x / y to x / hcat(y) and x \ y to hcat(x) \ y. Removing either is technically breaking, so I'm not sure how eligible that is in the 1.x timeline. We should not remove vector \ vector before 2.0, but scalar / vector was a very odd one to begin with (eg vector \ scalar doesn't exist and it never bothered anyone), and doesn't appear to be used (other than in error) |
@StefanKarpinski you should probably take a look at this issue if you haven't already. |
Did the linear algebra triage call happen? I think @antoine-levitt's analysis is spot on. Since this PR also removes |
Also pinging @KristofferC |
Not yet. |
@antoine-levitt I wonder if we should get this in. Can you rebase this? We'll run pkgeval once more and merge unless there is any further concern. |
eb14821
to
23c0b74
Compare
Thanks for pinging, I'd forgotten this. I'm assuming you meant only the scalar / vector part? I opened up a new PR, #44358, for that. I'm keeping this one, which has the more breaking vector/vector and vector\vector |
I suppose the more breaking stuff is a 2.0 thing. |
Fix #39987
This is breaking so should not be merged yet, I'm putting it up as suggested by @ViralBShah so PkgEval can be run to see if anybody actually uses this.