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

Method __init__

tasks/data_utils.py:46–66  ·  view source on GitHub ↗

Create a new InputExample. :param guid: a unique textual identifier :param text_a: the sequence of text :param text_b: an optional, second sequence of text :param label: an optional label :param logits: an optional list of per-class logits :p

(self, guid, text_a, text_b=None, label=None, logits=None, meta: Optional[Dict] = None, idx=-1,
                 num_choices=1)

Source from the content-addressed store, hash-verified

44 """A raw input example consisting of one or two segments of text and a label"""
45
46 def __init__(self, guid, text_a, text_b=None, label=None, logits=None, meta: Optional[Dict] = None, idx=-1,
47 num_choices=1):
48 """
49 Create a new InputExample.
50
51 :param guid: a unique textual identifier
52 :param text_a: the sequence of text
53 :param text_b: an optional, second sequence of text
54 :param label: an optional label
55 :param logits: an optional list of per-class logits
56 :param meta: an optional dictionary to store arbitrary meta information
57 :param idx: an optional numeric index
58 """
59 self.guid = guid
60 self.text_a = text_a
61 self.text_b = text_b
62 self.label = label
63 self.logits = logits
64 self.idx = idx
65 self.num_choices = num_choices
66 self.meta = meta if meta else {}
67
68 def __repr__(self):
69 return str(self.to_json_string())

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected