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

fix release script due to dependency test errors #2482

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

imatiach-msft
Copy link
Contributor

@imatiach-msft imatiach-msft commented Jan 2, 2024

Description

fix release script due to dependency test errors

The responsibleai-text package release script is failing due numpy version conflict issue with shap package in test cases. Note this has been fixed in latest shap but we haven't upgraded to it yet. For now pinning "numpy<1.24.0" in test cases. This pin will be removed once next version of interpret-community is released with latest shap.

Link to failing build:
https://github.com/microsoft/responsible-ai-toolbox/actions/runs/7390202783/job/20104608524

Error message from shap package:

/usr/share/miniconda/envs/test/lib/python3.8/site-packages/responsibleai/rai_insights/rai_base_insights.py:87: in compute
    manager.compute()
/usr/share/miniconda/envs/test/lib/python3.8/site-packages/responsibleai_text/managers/explainer_manager.py:117: in compute
    self._explanation = explainer(eval_examples)
/usr/share/miniconda/envs/test/lib/python3.8/site-packages/shap/explainers/_partition.py:136: in __call__
    return super().__call__(
/usr/share/miniconda/envs/test/lib/python3.8/site-packages/shap/explainers/_explainer.py:266: in __call__
    row_result = self.explain_row(
/usr/share/miniconda/envs/test/lib/python3.8/site-packages/shap/explainers/_partition.py:154: in explain_row
    fm = MaskedModel(self.model, self.masker, self.link, self.linearize_link, *row_args)
/usr/share/miniconda/envs/test/lib/python3.8/site-packages/shap/utils/_masked_model.py:28: in __init__
    self._variants = ~self.masker.invariants(*args)
/usr/share/miniconda/envs/test/lib/python3.8/site-packages/shap/maskers/_text.py:297: in invariants
    invariants = np.zeros(len(self._tokenized_s), dtype=np.bool)
...
        if attr in __former_attrs__:
>           raise AttributeError(__former_attrs__[attr])
E           AttributeError: module 'numpy' has no attribute 'bool'.
E           `np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
E           The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
E               https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

Successful build to validate this branch:
https://github.com/microsoft/responsible-ai-toolbox/actions/runs/7390367586

Checklist

  • I have added screenshots above for all UI changes.
  • I have added e2e tests for all UI changes.
  • Documentation was updated if it was needed.

@imatiach-msft imatiach-msft merged commit 4917ae5 into main Jan 2, 2024
61 checks passed
@imatiach-msft imatiach-msft deleted the ilmat/fix-rai-text-release branch January 2, 2024 22:07
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

Successfully merging this pull request may close these issues.

2 participants