question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow disassembled use of check_estimator

See original GitHub issue

Description

For my downstream project, I’m testing my classifier with check_estimator, and would like to see which of its individual tests failed. Doing so under nose works by using for check in _yield_all_checks(name, estimator): yield check, name, my_estimator (and a separate call to the class-level checks), but py.test won’t support yield-tests, and using _yield_all_checks to parameterize a test doesn’t work because the function requires the estimator instance.

Therefore the request is to provide all checks from check_estimator as a (non-private) iterable, so they can be used separately.

I brought this up in #10728 first, errorneously.

Versions

Linux-4.17.5-1-ARCH-x86_64-with-arch-Arch-Linux Python 3.6.6 (default, Jun 27 2018, 13:11:40) [GCC 8.1.1 20180531] NumPy 1.14.5 SciPy 1.1.0 Scikit-Learn 0.19.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
rthcommented, Jul 24, 2018

I thought I had commented on this. I’m not sure I’m convinced it’s good to enable running individual tests because that will encourage not running all tests.

Thanks for the feedback. Still suppose one has a a single check that doesn’t pass in check_estimator in a sklearn-contrib project. With an iterative setup, one could just skip the check in question and mark it as TODO later, and run the rest of checks. Without it, in the current situation, one would just not use check_estimator altogether because it would fail. I’m sure why the latter situation would be better.

It would give developers in scikit-learn contrib projects more flexibility if needed, without waiting for our 6month-12month release cycle. Flexibility is one of the things that was mentioned as limiting factor in https://github.com/scikit-learn/scikit-learn/issues/6715. Of course in the ideal world check_estimator would take into account all the needs of contrib projects, but currently we are not there yet.

Also honestly it’s annoying to have one tests that runs several dozens checks. That’s why we are parametrizing them in scikit-learn (before with yields now with pytest). Giving contrib projects a possibility to do the same, and trusting developers not to misuse it, would be nice IMO.

1reaction
amuellercommented, Jul 10, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Tax Withholding Estimator | Internal Revenue Service
Use this tool to estimate the federal income tax you want your employer to withhold from your paycheck. This is tax withholding.
Read more >
Salary Paycheck Calculator – Calculate Net Income - ADP
1. Determine taxable income by deducting any pre-tax contributions to benefits 2. Withhold all applicable taxes (federal, state and local) 3. Deduct any...
Read more >
Hourly Paycheck Calculator - ADP
Looking for managed Payroll and benefits for your business? Get a free quote. Gross To Net Calculator. Click here to use the.
Read more >
New York Hourly Paycheck and Payroll Calculator - Gusto
Use Gusto's hourly paycheck calculator to determine withholdings and calculate take-home pay for your hourly employees in New York.
Read more >
Use the Check Calculator - eGain
Navigate to HR & Payroll > Payroll > Check Calculator. Select the employee in the upper-right corner of the page. Select options on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found