MCPcopy Create free account
hub / github.com/THUDM/GLM / save_examples

Method save_examples

tasks/data_utils.py:87–90  ·  view source on GitHub ↗

Save a set of input examples to a file

(examples: List['InputExample'], path: str)

Source from the content-addressed store, hash-verified

85
86 @staticmethod
87 def save_examples(examples: List['InputExample'], path: str) -> None:
88 """Save a set of input examples to a file"""
89 with open(path, 'wb') as fh:
90 pickle.dump(examples, fh)
91
92
93def num_special_tokens_to_add(text_a_ids, text_b_ids, answer_ids, add_cls, add_sep, add_piece, add_eos=True):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected