MCPcopy Create free account
hub / github.com/google-research/language / Example

Class Example

language/quest/common/example_utils.py:48–58  ·  view source on GitHub ↗

Represents a query paired with a set of documents.

Source from the content-addressed store, hash-verified

46
47@dataclasses.dataclass(frozen=False)
48class Example:
49 """Represents a query paired with a set of documents."""
50 query: str
51 docs: typing.Iterable[str]
52 # TODO(cmalaviya,petershaw): Move this to `metadata`.
53 original_query: typing.Optional[str] = None
54 # Scores can be optionally included if the examples are generated from model
55 # predictions. Indexes of `scores` should correspond to indexes of `docs`.
56 scores: typing.Optional[typing.Iterable[float]] = None
57 # Optional metadata.
58 metadata: typing.Optional[ExampleMetadata] = None
59
60
61def read_examples(filepath):

Callers 1

read_examplesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…