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.

Creation of an experimental module

See original GitHub issue

The creation of an experimental module has been discussed and accepted during the recent Paris sprint. Experimental estimators / tools may break API and features without deprecation cycles.

We agreed to put the new GBDTs there so #12807 creates the experimental module, in a very minimal fashion.

However I don’t think there is consensus on how experimental tools should be imported by the users. IIRC 2 options were discussed:

Option 1:

from sklearn.ensemble import NewGBDTs  # raises a warning (or an error?):
                                       # "you're using an experimental feature"
import experimental  # silences the warning
from sklearn.ensemble import NewGBDTs  # no warning

Advantage:

  • No need to change user code when NewGBDTs become stable in ensemble.
  • no need for warnings “NewGBDTs will be removed from experimental and are now accessible from ensemble”

Drawback:

  • there’s no way to know which estimators / tools are experimental and which aren’t just by looking at the code
  • there’s a chance that users start using import experimental everywhere and then their code would break and they won’t know why

Option 2:

from sklearn.experimental import NewGBDTs

When NewGBDTs become stable, a warning is issued “NewGBDTs will be removed from experimental and are now accessible from ensemble”

Advantage:

  • more explicit (you know what’s experimental and what isn’t)

Drawback:

  • Users need to change their code even when the API of the estimator doesn’t change.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:41 (41 by maintainers)

github_iconTop GitHub Comments

1reaction
jnothmancommented, Apr 3, 2019

If concerned about the meaning of enable_experimental, call it i_understand_this_is_an_experimental_api. I think the import based solution is just a nuisance when things move.

1reaction
NicolasHugcommented, Mar 28, 2019

You’re talking about option 1 Adrin right? I agree this is a serious flaw.

OK, option 2 seems to be accepted. That’s what the new GBDTs PR does.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Experimental Design Module - SSRMC - William & Mary
The purpose of this module is to help you understand what differentiates experiments from other forms of research designs to facilitate your informed ......
Read more >
/experimental:module (Enable module support) | Microsoft Learn
Use the /experimental:module compiler option to enable experimental compiler support for named modules.
Read more >
Experimental modules and themes in Drupal core
Introduction to experimental modules and themes, and a list of them currently in development.
Read more >
Announcing a new --experimental-modules - Node.js - Medium
The new --experimental-modules provides two ways: for files, a “type” field in package.json; and for input via --eval, --print or STDIN, an --input-type...
Read more >
Module 2: Research Design - Section 2 | ORI
Definition: An experiment is a study in which a treatment, procedure, or program is intentionally introduced and a result or outcome is observed....
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