tlc.integration.hugging_face.features

Translation between Hugging Face datasets features and tlc sample type.

Module Contents

Functions

Function

Description

features_to_sample_type

Convert a Hugging Face dataset’s features to a 3LC SampleType.

API

features_to_sample_type(
features: Features,
) SampleType

Convert a Hugging Face dataset’s features to a 3LC SampleType.

Parameters:

features – The features of a Hugging Face dataset.

Returns:

The corresponding 3LC SampleType.

Raises:

NotImplementedError – If an unsupported feature type is encountered.