Skip to content

predictor visibility in AnchorTabular #428

Open
@RobertSamoilescu

Description

@RobertSamoilescu
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions