Closed dlaprins closed 1 year ago
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:
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).
When we still want to be able to use skorecard without the package: Couldn't we do the following?
OptimalBucketer
class in a separate file within the bucketers
folderbucketers/__init__.py
, that it imports OptimalBucketer
only if optbinning is installedSo if someone uses import bucketers
nothing is broken and from bucketers import OptimalBucketer
should still work
Skorecard relies on the optbinning package, but optbinning is not in the base_packages list of setup.py. It should be.