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#

tlc.integration.hugging_face.features.features_to_sample_type(features: datasets.Features) tlc.client.sample_type.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.