# alibi.saving

## Constants

### `TYPE_CHECKING`

```python
TYPE_CHECKING: bool = False
```

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

### `NOT_SUPPORTED`

```python
NOT_SUPPORTED: list = ['DistributedAnchorTabular', 'CEM', 'Counterfactual', 'CounterfactualProto']
```

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

## `NumpyEncoder`

*Inherits from:* `JSONEncoder`

### Methods

#### `default`

```python
default(obj)
```

| Name  | Type | Default | Description |
| ----- | ---- | ------- | ----------- |
| `obj` |      |         |             |

## Functions

### `load_explainer`

```python
load_explainer(path: Union[str, os.PathLike], predictor) -> Explainer
```

Load an explainer from disk.

| Name        | Type                      | Default | Description                                                               |
| ----------- | ------------------------- | ------- | ------------------------------------------------------------------------- |
| `path`      | `Union[str, os.PathLike]` |         | Path to a directory containing the saved explainer.                       |
| `predictor` |                           |         | Model or prediction function used to originally initialize the explainer. |

**Returns**

* Type: `Explainer`

### `save_explainer`

```python
save_explainer(explainer: Explainer, path: Union[str, os.PathLike]) -> None
```

Save an explainer to disk. Uses the `dill` module.

| Name        | Type                      | Default | Description                                                                 |
| ----------- | ------------------------- | ------- | --------------------------------------------------------------------------- |
| `explainer` | `Explainer`               |         | Explainer instance to save to disk.                                         |
| `path`      | `Union[str, os.PathLike]` |         | Path to a directory. A new directory will be created if one does not exist. |

**Returns**

* Type: `None`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seldon.ai/alibi-explain/api-reference/saving.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
