Moffran / calibrated_explanations

Repository for the explanation method Calibrated Explanations (CE)
BSD 3-Clause "New" or "Revised" License
39 stars 5 forks source link

Rename python module to calibrated_explanations (for PyPI) #3

Closed rudymatela closed 11 months ago

rudymatela commented 11 months ago

We need to rename our main python module from ce to calibrated_explanations (or something else) before publication at PyPI. I explain below.

Currently, this library is used as:

import ce

or

from ce import *

I initially tried to name the package ce on PyPI, but that name is reserved by PyPI -- I think it is too short. So I guess it makes sense to go with a more descriptive name "calibrated explanations".

PEP 423 details the rules for packages published at PyPI. The main guideline is that the module name should match the package name. Following the guidelines there (which I won't repeat here for brevity), my suggestion is:

The inconsistency between underscore (_) and dash (-) above is intentional and follows the community standard:

So I suggest we should move so that this library is imported as:

import calibrated_explanations

or

from calibrated_explanations import *

(which was what was here actually before I imported changes from the internal repository.)

And the package would be installed as

$ pip install calibrated-explanations

I'll move on with this change soon. I'll make sure to backport the changes to the internal repository and update @tuvelofstrom's Python notebooks with the updated import afterwards.

rudymatela commented 11 months ago

@tuvelofstrom and @Moffran Please let me know what you think of these proposed changes. :smiley: If you agree I'll move on with them.

rudymatela commented 11 months ago

I merged a PR #3 fixing this already not to delay this further. We can always revert to a previous version, or simply update further with a better option.

rudymatela commented 11 months ago

@tuvelofstrom I made sure to update the internal repository accordingly so that the code there matches the one here.

The ipynbs were updated from:

from ce import blah

to

from calibrated_explanations import blah

If you have issues running the notebooks there let me know. (I tested on jupyter-lab and they worked okay after the change.)