# tfdf.inspector.make_inspector

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/decision-forests/blob/main/tensorflow_decision_forests/component/inspector/inspector.py#L89-L123) |

Creates an inspector for a model.

    tfdf.inspector.make_inspector(
        directory: str, file_prefix: Optional[str] = None
    ) -> 'AbstractInspector'

### Used in the notebooks

| Used in the tutorials |
|---|
| - [Inspect and debug decision forest models](https://www.tensorflow.org/decision_forests/tutorials/advanced_colab) |

If `file_prefix` is not given, the prefix is auto-detected. Auto-detection
fails if multiple models models are stored in the directory.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `directory` | Path to the model. |
| `file_prefix` | Internal prefix of the model files. If not specified (None), the prefix is automatically determined. If the directory contains multiple models, the prefix should be provided. If `file_prefix=""`, the model is built without prefix (which is legal). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Inspector for the given model. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | The model type is unsupported or prefix autodetection failed. |

<br />