MCPcopy Create free account
hub / github.com/agentscope-ai/Trinity-RFT / from_hf_datasets

Function from_hf_datasets

trinity/common/experience.py:654–661  ·  view source on GitHub ↗

Convert a HuggingFace Dataset back to a list of Experience objects.

(dataset: "Dataset")

Source from the content-addressed store, hash-verified

652
653
654def from_hf_datasets(dataset: "Dataset") -> List[Experience]:
655 """
656 Convert a HuggingFace Dataset back to a list of Experience objects.
657 """
658
659 experiences = [build_dataclass_from_mapping(Experience, row) for row in dataset.to_list()]
660
661 return experiences

Callers 2

process_experienceMethod · 0.90

Calls 1

Tested by 1