Skip to content

[MRG + 2] Deprecates load_lfw_pairs and load_lfw_people #4431

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

Merged
merged 1 commit into from
Jun 1, 2015

Conversation

vinayak-mehta
Copy link
Contributor

#4425 I was wondering if this needs a DeprecationWarning or some change in the doc?

ping @amueller @ogrisel

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0%) to 95.09% when pulling 0e16c7e on vortex-ape:deprecate_func into 3b32099 on scikit-learn:master.

@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling 0e16c7e on vortex-ape:deprecate_func into 3b32099 on scikit-learn:master.

@GaelVaroquaux
Copy link
Member

What you have done is not a deprecation, but a removal :).

You need to keep the functions in, and at to them a "deprecated" decorated that says that they will be removed in 2 releases (give the release name).

The idea is that we should never break user's code without warning.

Removing them from the docs is however a good idea.

@vinayak-mehta
Copy link
Contributor Author

Oops, sorry. I'll add the decorator.

Do we need to test load_lfw_pairs and load_lfw_people now that we are deprecating them? If yes, I think I need to undo the changes made to the tests.

Also, should I add a test checking if the warning is raised?

@vinayak-mehta
Copy link
Contributor Author

Reverted changes made in test_lfw.py for now.

@landscape-bot
Copy link

Code Health
Repository health decreased by 0.03% when pulling cee5082 on vortex-ape:deprecate_func into 3b32099 on scikit-learn:master.

@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling 9303efd on vortex-ape:deprecate_func into 3b32099 on scikit-learn:master.

@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling 3a385f0 on vortex-ape:deprecate_func into 3b32099 on scikit-learn:master.

@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling 6479394 on vortex-ape:deprecate_func into 2badad3 on scikit-learn:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) to 95.09% when pulling 6479394 on vortex-ape:deprecate_func into 2badad3 on scikit-learn:master.

@amueller
Copy link
Member

keep the tests, but catch the warnings (possibly add @ignore_warnings to them or use with warnings.catch_warnings).

@amueller
Copy link
Member

Removed in 0.19 unfortunately ;) (this is the 0.17 branch)

@vinayak-mehta
Copy link
Contributor Author

Oops, I'll change it.



def test_load_fake_lfw_pairs():
lfw_pairs_train = load_lfw_pairs(data_home=SCIKIT_LEARN_DATA)
with warnings.catch_warnings():
lfw_pairs_train = load_lfw_pairs(data_home=SCIKIT_LEARN_DATA)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, is there such a test for fetch_lfw_pairs? If there is not, the tests should just be for fetch not load. If there are tests for both, just keep them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There aren't any tests for fetch_lfw_pairs or fetch_lfw_people [checked using git grep]. Maybe I could add the same tests for fetch_lfw by copying and renaming these existing tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. Sorry then my previous guidance was wrong. I thought there were tests for both. Please rename all tests to use fetch_lfw_pairs. If you like, you can do a for loop in the tests over both functions, but I don't think this is necessary.

@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling fe23b9b on vortex-ape:deprecate_func into 2badad3 on scikit-learn:master.

@landscape-bot
Copy link

Code Health
Repository health decreased by 0.00% when pulling 843ee88 on vortex-ape:deprecate_func into 689388a on scikit-learn:master.

@amueller
Copy link
Member

amueller commented Apr 1, 2015

LGTM

@amueller amueller changed the title Deprecates load_lfw_pairs and load_lfw_people [MRG + 1] Deprecates load_lfw_pairs and load_lfw_people Apr 1, 2015
@vinayak-mehta
Copy link
Contributor Author

@ogrisel - can you review this? :)

Added deprecated decorator

Added import statement

Added tests

Added newline

Ignored deprecation warnings

Renamed tests for fetch_lfw_

Added imports for load_lfw_
@kastnerkyle
Copy link
Member

The only thing here is removing something (load_x) that isn't inline with the rest of the API, right? If so, it looks ok to me.

@amueller
Copy link
Member

it removes an undocumented alias.

@kastnerkyle
Copy link
Member

Ok well consider this my +1 then!

On Thu, Apr 16, 2015 at 3:55 PM, Andreas Mueller notifications@github.com
wrote:

it removes an undocumented alias.


Reply to this email directly or view it on GitHub
#4431 (comment)
.

@kastnerkyle kastnerkyle changed the title [MRG + 1] Deprecates load_lfw_pairs and load_lfw_people [MRG + 2] Deprecates load_lfw_pairs and load_lfw_people Apr 16, 2015
amueller added a commit that referenced this pull request Jun 1, 2015
[MRG + 2] Deprecates load_lfw_pairs and load_lfw_people
@amueller amueller merged commit 2c79a98 into scikit-learn:master Jun 1, 2015
@vinayak-mehta vinayak-mehta deleted the deprecate_func branch September 11, 2015 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy