It is done within the dataset AFAIK.
dataset = load_dataset(...)
dataset.features["label"].feature.names  # All label names
dataset.features["label"].feature._int2str  # Same as `.names`
dataset.features["label"].feature._str2int  # Mapping from labels to integer