I think Alex's and my concerns are legit. The SLEP is asking "are you OK
with forcing some parameters to be kwords only? We still don't know
which ones though".
I understand why you don't want to bike shed now, but that's a
surprisingly mild SLEP, hence the questions.
The only response I can give to the SLEP is right now is "sure, depends".
Nicolas
On 9/18/19 11:24 AM, Andreas Mueller wrote:
The SLEP says:
This proposal suggests making only/most commonly/used parameters
positional. The/most commonly/used parameters are defined per method
or function, to be defined as either of the following two ways:
* The set defined and agreed upon by the core developers, which
should cover the/easy/cases.
* A set identified as being in the top 95% of the use cases, using
some automated analysis such asthis one
<https://odyssey.readthedocs.io/en/latest/tutorial.html>orthis one
<https://github.com/Quansight-Labs/python-api-inspect>.
And describes a clear deprecation path.
So that seems pretty actionable?
Also, I vote +1 on the SLEP.
Nicolas: Do you think this is not actionable? I had suggested that we
define a clear rule but doing a case-by-case seems better than
bikeshedding now.
Alexandre: did you read the SLEP before asking? I thought the point of
the SLEP was to summarize the discussion. If your question is not
answered we should amend the SLEP.
On 9/11/19 2:21 PM, Nicolas Hug wrote:
Since there is no explicit proposal in the SLEP it's not very clear
what we need to vote for / against?
But overall I'm + 1 on forcing kwargs for all __init__ methods.
Nicolas
On 9/11/19 9:38 AM, Adrin wrote:
Hi,
I'm (mostly) the messenger, don't shoot me :P
It may help to summarize the SLEP:
1. This can be applied to all methods, not just __init__.
2. The SLEP doesn't say we have to apply it everywhere. It's mostly
that it lets us do that.
3. It doesn't make ALL inputs a keywords only argument. The common
ones such as X and y in fit(X, y) will stay as they are.
Therefore clf.fit(X, y) will definitely be allowed.
4. Whether or not sample_weight should be keyword only or not in
fit, requires its own discussion, and the route of the discussion
is defined in the SLEP.
In other words, if an input parameter is used as a positional
argument less frequently than X% of the time, then it can/should be
a keyword only argument. But the SLEP better defines these conditions.
I hope that clarifies it a little bit.
Adrin/
On Wed, Sep 11, 2019 at 3:23 PM Alexandre Gramfort
<alexandre.gramf...@inria.fr <mailto:alexandre.gramf...@inria.fr>>
wrote:
hi,
Adrin do you suggest this for everything or maybe just for __init__
params of estimators
and stuff that can come after X, y in fit eg sample_weights?
would:
clf.fit(X, y)
still be allowed?
Alex
_______________________________________________
scikit-learn mailing list
scikit-learn@python.org <mailto:scikit-learn@python.org>
https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn