Skip to content
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

Missing dependency #94

Closed
dlaprins opened this issue Mar 3, 2023 · 2 comments
Closed

Missing dependency #94

dlaprins opened this issue Mar 3, 2023 · 2 comments

Comments

@dlaprins
Copy link

dlaprins commented Mar 3, 2023

Skorecard relies on the optbinning package, but optbinning is not in the base_packages list of setup.py. It should be.

@timvink
Copy link
Contributor

timvink commented Mar 6, 2023

The idea initially was that you can use skorecard without optbinning also, which is quite a heavy depencency.

Hence this code, which gives a helpful error message:

try:
from optbinning import OptimalBinning
except ModuleNotFoundError:
OptimalBinning = NotInstalledError("optbinning")

But now bucketers.py has a lot more bucketers than just OptimalBucketer, so you can't really get around it. So, either we add it as a dependency, or, we separate each bucketer into it's own module (and use the __init__.py file to control the namespace, so we don't breaking any existing imports).

@Dronakurl
Copy link
Contributor

Dronakurl commented Apr 22, 2023

When we still want to be able to use skorecard without the package:
Couldn't we do the following?

  • put the OptimalBucketer class in a separate file within the bucketers folder
  • adjust bucketers/__init__.py, that it imports OptimalBucketer only if optbinning is installed

So if someone uses import bucketers nothing is broken and from bucketers import OptimalBucketer should still work

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

No branches or pull requests

4 participants