# tfma.extractors.LabelsExtractor

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/model-analysis/blob/v0.46.0/tensorflow_model_analysis/extractors/labels_extractor.py#L28-L46) |

Creates an extractor for extracting labels.

    tfma.extractors.LabelsExtractor(
        eval_config: https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/EvalConfig
    ) -> https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/extractors/Extractor

The extractor's PTransform uses the config's ModelSpec.label_key(s) to lookup
the associated label values stored as features under the tfma.FEATURES_KEY
(and optionally tfma.TRANSFORMED_FEATURES_KEY) in extracts. The resulting
values are then added to the extracts under the key tfma.LABELS_KEY.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `eval_config` | Eval config. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Extractor for extracting labels. ||

<br />