tfma.extractors.SliceKeyExtractor
Stay organized with collections
Save and categorize content based on your preferences.
Creates an extractor for extracting slice keys.
tfma.extractors.SliceKeyExtractor(
slice_spec: Optional[List[slicer.SingleSliceSpec]] = None,
eval_config: Optional[tfma.EvalConfig
] = None,
materialize: Optional[bool] = True
) -> tfma.extractors.Extractor
The incoming Extracts must contain features stored under tfma.FEATURES_KEY
and optionally under tfma.TRANSFORMED_FEATURES.
The extractor's PTransform yields a copy of the Extracts input with an
additional extract pointing at the list of SliceKeyType values keyed by
tfma.SLICE_KEY_TYPES_KEY. If materialize is True then a materialized version
of the slice keys will be added under the key tfma.SLICE_KEYS_KEY.
Args |
slice_spec
|
Deprecated (use EvalConfig).
|
eval_config
|
Optional EvalConfig containing slicing_specs specifying the
slices to slice the data into. If slicing_specs are empty, defaults to
overall slice.
|
materialize
|
True to add MaterializedColumn entries for the slice keys.
|
Returns |
Extractor for slice keys.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tfma.extractors.SliceKeyExtractor\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/model-analysis/blob/v0.46.0/tensorflow_model_analysis/extractors/slice_key_extractor.py#L32-L75) |\n\nCreates an extractor for extracting slice keys. \n\n tfma.extractors.SliceKeyExtractor(\n slice_spec: Optional[List[slicer.SingleSliceSpec]] = None,\n eval_config: Optional[../../tfma/EvalConfig] = None,\n materialize: Optional[bool] = True\n ) -\u003e ../../tfma/extractors/Extractor\n\nThe incoming Extracts must contain features stored under tfma.FEATURES_KEY\nand optionally under tfma.TRANSFORMED_FEATURES.\n\nThe extractor's PTransform yields a copy of the Extracts input with an\nadditional extract pointing at the list of SliceKeyType values keyed by\ntfma.SLICE_KEY_TYPES_KEY. If materialize is True then a materialized version\nof the slice keys will be added under the key tfma.SLICE_KEYS_KEY.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| `slice_spec` | Deprecated (use EvalConfig). |\n| `eval_config` | Optional EvalConfig containing slicing_specs specifying the slices to slice the data into. If slicing_specs are empty, defaults to overall slice. |\n| `materialize` | True to add MaterializedColumn entries for the slice keys. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| Extractor for slice keys. ||\n\n\u003cbr /\u003e"]]