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

Method get_doc

data_utils/datasets.py:944–949  ·  view source on GitHub ↗

gets text of document corresponding to idx

(self, idx)

Source from the content-addressed store, hash-verified

942 return tokens, token_types
943
944 def get_doc(self, idx):
945 """gets text of document corresponding to idx"""
946 rtn = self.ds[idx]
947 if isinstance(rtn, dict):
948 rtn = rtn['text']
949 return rtn
950
951 def create_random_sentencepair(self, target_seq_length, rng, np_rng):
952 """

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected