MCPcopy Create free account
hub / github.com/apple/axlearn / select_fields

Function select_fields

axlearn/common/input_tf_data.py:582–585  ·  view source on GitHub ↗

Filter the dataset to only select the fields specified.

(fields: Sequence[str])

Source from the content-addressed store, hash-verified

580
581
582def select_fields(fields: Sequence[str]) -> DatasetToDatasetFn:
583 """Filter the dataset to only select the fields specified."""
584
585 return rekey({k: k for k in fields}, retain_original_inputs=False)
586
587
588def remove_fields(fields: Sequence[str]) -> DatasetToDatasetFn:

Callers

nothing calls this directly

Calls 1

rekeyFunction · 0.70

Tested by

no test coverage detected