# tfdf.inspector.detect_model_file_prefix

<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#L986-L1011) |

Auto-detects the model's file prefix if possible.

    tfdf.inspector.detect_model_file_prefix(
        model_path: str
    ) -> str

Raises ValueError if more than one prefix is detected or if the model
directory is invalid.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `model_path` | Path to the model's directory. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| File prefix of the model. ||

<br />