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

predictor visibility in AnchorTabular #428

Open
RobertSamoilescu opened this issue Jun 14, 2021 · 1 comment
Open

predictor visibility in AnchorTabular #428

RobertSamoilescu opened this issue Jun 14, 2021 · 1 comment

Comments

@RobertSamoilescu
Copy link
Collaborator

  • Consider changing the visibility of predictor from public to private, and update the documentation examples. Instead of using the explainer.predictor, use directly the original predictor.

  • The predictor is set to None when saving:

    alibi/alibi/saving.py

    Lines 101 to 106 in af1b351

    def _simple_save(explainer: 'Explainer', path: Union[str, os.PathLike]) -> None:
    predictor = explainer.predictor # type: ignore
    explainer.predictor = None # type: ignore
    with open(Path(path, 'explainer.dill'), 'wb') as f:
    dill.dump(explainer, f, recurse=True)
    explainer.predictor = predictor # type: ignore

  • Specify that in order to change the predictor, reset_predictor should be called.

@jklaise
Copy link
Contributor

jklaise commented Jun 14, 2021

This extends to all explainers. Will need to check if some other projects (Core, Tempo) are using the predictor attribute directly @cliveseldon .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants