From d4302bd6bfc7e4c778ba0e96397ac620242a8d21 Mon Sep 17 00:00:00 2001 From: Bin Du Date: Mon, 6 Nov 2023 13:57:50 -0800 Subject: [PATCH] Annotate new data points created from counterfactual generator before adding to the data table. PiperOrigin-RevId: 579949562 --- lit_nlp/client/modules/generator_module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lit_nlp/client/modules/generator_module.ts b/lit_nlp/client/modules/generator_module.ts index 87b9bbb9..b5fed37a 100644 --- a/lit_nlp/client/modules/generator_module.ts +++ b/lit_nlp/client/modules/generator_module.ts @@ -205,7 +205,7 @@ export class GeneratorModule extends LitModule { } private async createNewDatapoints(data: IndexedInput[][]) { - const newExamples = flatten(data); + const newExamples = await this.appState.annotateNewData(flatten(data)); this.appState.commitNewDatapoints(newExamples); const newIds = newExamples.map(d => d.id); if (newIds.length === 0) return;