moscot
moscot copied to clipboard
prepare method does not warn about unknown parameters
I was just wondering why problem.prepare
recomputes a PCA, even though I pre-computed one and passed join_attr='X_pca'
until I realized that I had a typo in there. The prepare
method does not complain about this, which can lead to unexpected behaviour.
Hi Marius,
Thanks for opening this issue.
I think we should discuss whether we want to throw an error for unrecognized arguments. We do this in the solve
methods, as we can follow a clear logic there, i.e. testing whether an argument is an attribute of the solver class.
In prepare
we don't have a logic like this, so we'd have to hard code the arguments we check for.
@michalk8 , do you have an opinion on this?
we discussed this extensively in the past and I still think it's a pretty bad and unique ux design, wrong arguments should always errors, I understand that we had other priorities but it's something we'll have to figure out sooner than later
Thanks for your reply @MUCDK - I fully agree with @giovp, not throwing error for unrecognised arguments can get really confusing.
closed with https://github.com/theislab/moscot/pull/696
amazing, this is great! I think this was very important and will prevent many future mistakes in practical applications.