-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Public vs. private utils again #6616
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
Comments
As a corollary of 1., we can also set some of the current utils as private but we need to apply the usual 2 release rule before. |
Ok for me
|
Thanks for raising this. This sounds like a reasonable approach, and I On 2 April 2016 at 03:17, Alexandre Gramfort notifications@github.com
|
Indeed fixes should be removed when we no longer need them, since we want upstream packages to depend directly on SciPy. Moreover, packages that depend on scikit-learn should require at least the same version of SciPy as scikit-learn so removing the fixes doesn't seem too problematic. |
I agree with the general idea of this proposal, and it feels right.
Don't you think that making everything public is a bit heavyhanded? Is I suggest that we try to import as much as possible public stuff in Finally, we should probably start documenting a bit utils if we make it |
My point is that we don't know which utils people use or not and people complain when things break. We can trim down our set of public utils but we need to do it progressively through the usual two release cycle rule.
I would rather keep the hierarchy. This is important for documentation purposes. |
We can't do that. This will break stuff in released code (e.g. lightning). |
My point is that we don't know which utils people use or not and people
complain when things break. We can trim down our set of public utils but we
need to do it progressively through the usual two release cycle rule.
This was private. So if people are using things that change, too bad.
And, as a data point, nilearn will be affected, so I am putting my own
work at risk too when saying this.
It's just a question of avoiding friction and burden on scikit-learn.
|
I don't think there's much burden if we immediately mark as deprecated On 4 April 2016 at 22:17, Gael Varoquaux notifications@github.com wrote:
|
I don't think there's much burden if we immediately mark as deprecated
anything that may have been assumed reusable but we don't want to keep that
assumption.
Granted. I am +1 with that approach.
|
No, it's our fault. If it had been private, the module should have been named |
No, it's our fault. If it had been private, the module should have been named _utils.
Anyhow, I agree with Joel's comment that the burden isn't very big.
|
That's it. I always assumed that utils were created public to be used by side projects as well. And then - voila - no At this moment I have no idea why not to keep that old functions permanently, but marked as deprecated. Finally, don't you want sklearn-compatible projects to handle inputs in a common manner? If utils are anyway going to become non-pubilc:
|
At this moment I have no idea why not to keep that old functions permanently,
but marked as deprecated.
Because we'll have to maintain them. Because the more code in a project,
the harder it is to understand the codebase.
|
We definitely can't keep old functions permanently but we plan to use the same two-release deprecation cycle as in the rest of the code base (this includes when deleting, changing or moving a function). |
+1 on the conclusions. This should be done rather sooner than later. flag 0.18? |
So what needs to be done to make things public is:
Do others agree? Regarding making some private: for ease, can we begin with the assumption that anything poorly documented and tested should be deprecated from the public API? |
Adding the modules to classes.rst and going through the docstrings would be a good task for the sprint. I would start with a PR with everything that is currently directly in the "utils" module, either because they are implemented there or because they are imported. |
@tguillemot is someone working on this? |
@amueller Nope |
@amueller I would like to work on the issue |
@souravsingh have you worked on this? |
@amueller No, But I would like to start work on the issue. We only need to add utils to classes.rst, check docstrings, correct? |
I don't know how to deprecate We cannot move I would propose to make it private like the rest. |
@amueller the "private" list is now complete, except for |
How much of this is left @NicolasHug ? Mostly done I guess? |
See comment just above |
I did, it was cryptic and I didn't understand it :P |
It refers to #6616 (comment) |
Let's close it since it's no longer a general problem, but a question of specific functions? Thanks for the great effort, @NicolasHug |
How about the "unsure tending towards deprecation"? Should we open an issue with that list? |
I think these would be part of the developer API discussion (if it happens). So yes I'd say another issue is fine |
@NicolasHug can you check if the ones in the API doc are exactly match what's public right now? I.e. are there any public function that are not documented in the api docs? I was surprised to see that only one of the methods we deprecated actually was documented before, so it looks like our deprecation was very consistent with what @jnothman did in #8827. But we should double check. |
Here are the discrepancies I could find in
|
@NicolasHug in classes but not in all is easy, right? just put into all. Not sure which of the other ones we actually want public. Can we check those decisions/discussions? |
Sorry I didn't get that |
in classes but not in all I meant. |
Oh OK then yes, it's easy.
yes, I think it should be part of #15801 , CC @thomasjpfan |
Now that we created scikit-learn-contrib, one of scikit-learn's roles is to ease the creation of new contrib projects. So we really need to sort out the public vs. private utils issue once and for all. Despite many discussions, AFAIK, we haven't reached a consensus or come up with a realistic plan.
Whether we like it or not, people do use utils and they complain when utils break.
Based on this I propose that
The text was updated successfully, but these errors were encountered: