Skip to content

Commit a21d7d6

Browse files
change: added metadata field to semantic similarity example
1 parent b9c0038 commit a21d7d6

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

datasets/dataset_xla.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ func (s *SemanticSimilarityDataset) Validate() error {
7070

7171
// SemanticSimilarityExample is a single example for the semantic similarity dataset.
7272
type SemanticSimilarityExample struct {
73-
Sentence1 string `json:"sentence1"`
74-
Sentence2 string `json:"sentence2"`
75-
Score float32 `json:"score"`
73+
Sentence1 string `json:"sentence1"`
74+
Sentence2 string `json:"sentence2"`
75+
Score float32 `json:"score"`
76+
Data map[string]any // to store any additional data for the example. Not used by the dataset.
7677
}
7778

7879
type ExamplePreprocessFunc func([]SemanticSimilarityExample) ([]SemanticSimilarityExample, error)

0 commit comments

Comments
 (0)