From 243a058db08995e5d8c789444a104dc852528eb0 Mon Sep 17 00:00:00 2001 From: Jan Kuehle Date: Tue, 16 Jan 2024 08:23:18 -0800 Subject: [PATCH] Automated Code Change PiperOrigin-RevId: 598848097 --- lit_nlp/client/modules/annotated_text_module.ts | 4 ++-- lit_nlp/client/modules/confusion_matrix_module.ts | 2 +- lit_nlp/client/modules/curves_module.ts | 2 +- lit_nlp/client/modules/data_table_module.ts | 2 +- lit_nlp/client/modules/datapoint_editor_module.ts | 2 +- lit_nlp/client/modules/feature_attribution_module.ts | 2 +- lit_nlp/client/modules/generated_text_module.ts | 4 ++-- lit_nlp/client/modules/generator_module.ts | 2 +- lit_nlp/client/modules/lm_prediction_module.ts | 2 +- lit_nlp/client/modules/metrics_module.ts | 2 +- lit_nlp/client/modules/regression_module.ts | 2 +- lit_nlp/client/modules/salience_map_module.ts | 2 +- lit_nlp/client/modules/sequence_salience_module.ts | 4 ++-- lit_nlp/client/modules/tda_module.ts | 4 ++-- 14 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lit_nlp/client/modules/annotated_text_module.ts b/lit_nlp/client/modules/annotated_text_module.ts index 800438c4..286d8c76 100644 --- a/lit_nlp/client/modules/annotated_text_module.ts +++ b/lit_nlp/client/modules/annotated_text_module.ts @@ -19,9 +19,9 @@ import { html} from 'lit'; import {observable} from 'mobx'; import {LitModule} from '../core/lit_module'; -import {AnnotationGroups, TextSegments} from '../elements/annotated_text_vis'; +import {type AnnotationGroups, TextSegments} from '../elements/annotated_text_vis'; import {MultiSegmentAnnotations, TextSegment} from '../lib/lit_types'; -import {IndexedInput, ModelInfoMap, Spec} from '../lib/types'; +import {type IndexedInput, ModelInfoMap, Spec} from '../lib/types'; import {doesOutputSpecContain, filterToKeys, findSpecKeys} from '../lib/utils'; import {styles as sharedStyles} from '../lib/shared_styles.css'; diff --git a/lit_nlp/client/modules/confusion_matrix_module.ts b/lit_nlp/client/modules/confusion_matrix_module.ts index fd9af769..1c8fcea6 100644 --- a/lit_nlp/client/modules/confusion_matrix_module.ts +++ b/lit_nlp/client/modules/confusion_matrix_module.ts @@ -29,7 +29,7 @@ import {MulticlassPreds} from '../lib/lit_types'; import {styles as sharedStyles} from '../lib/shared_styles.css'; import {GroupedExamples, IndexedInput, ModelInfoMap} from '../lib/types'; import {arrayContainsSame, doesOutputSpecContain, facetMapToDictKey} from '../lib/utils'; -import {FacetingMethod, GetFeatureFunc, GroupService, NumericFeatureBins} from '../services/group_service'; +import {FacetingMethod, GetFeatureFunc, GroupService, type NumericFeatureBins} from '../services/group_service'; import {DataService, SelectionService} from '../services/services'; import {styles} from './confusion_matrix_module.css'; diff --git a/lit_nlp/client/modules/curves_module.ts b/lit_nlp/client/modules/curves_module.ts index 0d428b57..27650837 100644 --- a/lit_nlp/client/modules/curves_module.ts +++ b/lit_nlp/client/modules/curves_module.ts @@ -28,7 +28,7 @@ import {FacetsChange} from '../core/faceting_control'; import {LitModule} from '../core/lit_module'; import {MulticlassPreds} from '../lib/lit_types'; import {styles as sharedStyles} from '../lib/shared_styles.css'; -import {GroupedExamples, IndexedInput, ModelInfoMap, SCROLL_SYNC_CSS_CLASS, Spec} from '../lib/types'; +import {type GroupedExamples, IndexedInput, ModelInfoMap, SCROLL_SYNC_CSS_CLASS, Spec} from '../lib/types'; import {findSpecKeys, hasValidParent} from '../lib/utils'; import {NumericFeatureBins} from '../services/group_service'; import {GroupService} from '../services/services'; diff --git a/lit_nlp/client/modules/data_table_module.ts b/lit_nlp/client/modules/data_table_module.ts index bf41ce31..7f6a1a43 100644 --- a/lit_nlp/client/modules/data_table_module.ts +++ b/lit_nlp/client/modules/data_table_module.ts @@ -30,7 +30,7 @@ import {LitModule} from '../core/lit_module'; import {ColumnHeader, DataTable, SortableTemplateResult, TableData, TableEntry} from '../elements/table'; import {BooleanLitType, LitType, LitTypeWithVocab, URLLitType} from '../lib/lit_types'; import {styles as sharedStyles} from '../lib/shared_styles.css'; -import {formatForDisplay, IndexedInput, ModelInfoMap, Spec} from '../lib/types'; +import {formatForDisplay, IndexedInput, ModelInfoMap, type Spec} from '../lib/types'; import {compareArrays} from '../lib/utils'; import {DataService, FocusService, SelectionService, SliceService} from '../services/services'; import {STARRED_SLICE_NAME} from '../services/slice_service'; diff --git a/lit_nlp/client/modules/datapoint_editor_module.ts b/lit_nlp/client/modules/datapoint_editor_module.ts index c80f5d66..a27460e3 100644 --- a/lit_nlp/client/modules/datapoint_editor_module.ts +++ b/lit_nlp/client/modules/datapoint_editor_module.ts @@ -30,7 +30,7 @@ import {LitModule} from '../core/lit_module'; import {AnnotationCluster, EdgeLabel, SpanLabel} from '../lib/dtypes'; import {BooleanLitType, EdgeLabels, Embeddings, ImageBytes, ListLitType, LitTypeWithVocab, MultiSegmentAnnotations, Scalar, SearchQuery, SequenceTags, SpanLabels, SparseMultilabel, StringLitType, Tokens, URLLitType} from '../lib/lit_types'; import {styles as sharedStyles} from '../lib/shared_styles.css'; -import {formatAnnotationCluster, formatEdgeLabel, formatSpanLabel, IndexedInput, Input, ModelInfoMap, SCROLL_SYNC_CSS_CLASS, Spec} from '../lib/types'; +import {formatAnnotationCluster, formatEdgeLabel, formatSpanLabel, type IndexedInput, type Input, ModelInfoMap, SCROLL_SYNC_CSS_CLASS, Spec} from '../lib/types'; import {findSpecKeys, isLitSubtype, makeModifiedInput} from '../lib/utils'; import {GroupService} from '../services/group_service'; import {SelectionService} from '../services/selection_service'; diff --git a/lit_nlp/client/modules/feature_attribution_module.ts b/lit_nlp/client/modules/feature_attribution_module.ts index 2f84cfbd..ae07f221 100644 --- a/lit_nlp/client/modules/feature_attribution_module.ts +++ b/lit_nlp/client/modules/feature_attribution_module.ts @@ -34,7 +34,7 @@ import {IndexedInput, ModelInfoMap} from '../lib/types'; import * as utils from '../lib/utils'; import {findSpecKeys} from '../lib/utils'; import {SignedSalienceCmap} from '../services/color_service'; -import {NumericFeatureBins} from '../services/group_service'; +import {type NumericFeatureBins} from '../services/group_service'; import {AppState, GroupService} from '../services/services'; import {styles as sharedStyles} from '../lib/shared_styles.css'; diff --git a/lit_nlp/client/modules/generated_text_module.ts b/lit_nlp/client/modules/generated_text_module.ts index 0f34bf13..0c0ba927 100644 --- a/lit_nlp/client/modules/generated_text_module.ts +++ b/lit_nlp/client/modules/generated_text_module.ts @@ -26,10 +26,10 @@ import {computed, observable} from 'mobx'; import {LitModule} from '../core/lit_module'; import {styles as visStyles} from '../elements/generated_text_vis.css'; import {LitSwitch} from '../elements/switch'; -import {DiffMode, GeneratedTextResult, GENERATION_TYPES} from '../lib/generated_text_utils'; +import {DiffMode, type GeneratedTextResult, GENERATION_TYPES} from '../lib/generated_text_utils'; import {GeneratedText, GeneratedTextCandidates, LitTypeWithParent, ReferenceScores, ReferenceTexts} from '../lib/lit_types'; import {styles as sharedStyles} from '../lib/shared_styles.css'; -import {IndexedInput, Input, ModelInfoMap, Spec} from '../lib/types'; +import {IndexedInput, type Input, ModelInfoMap, Spec} from '../lib/types'; import {doesOutputSpecContain, findSpecKeys} from '../lib/utils'; import {styles} from './generated_text_module.css'; diff --git a/lit_nlp/client/modules/generator_module.ts b/lit_nlp/client/modules/generator_module.ts index b5fed37a..79af59bb 100644 --- a/lit_nlp/client/modules/generator_module.ts +++ b/lit_nlp/client/modules/generator_module.ts @@ -30,7 +30,7 @@ import {LitModule} from '../core/lit_module'; import {TableData, TableEntry} from '../elements/table'; import {EdgeLabels, FieldMatcher, LitTypeTypesList, SpanLabels} from '../lib/lit_types'; import {styles as sharedStyles} from '../lib/shared_styles.css'; -import {CallConfig, formatForDisplay, IndexedInput, Input, ModelInfoMap, Spec} from '../lib/types'; +import {CallConfig, formatForDisplay, IndexedInput, type Input, ModelInfoMap, Spec} from '../lib/types'; import {cloneSpec, flatten, isLitSubtype} from '../lib/utils'; import {GroupService} from '../services/group_service'; import {SelectionService, SliceService} from '../services/services'; diff --git a/lit_nlp/client/modules/lm_prediction_module.ts b/lit_nlp/client/modules/lm_prediction_module.ts index 94b60a2c..90f7aeab 100644 --- a/lit_nlp/client/modules/lm_prediction_module.ts +++ b/lit_nlp/client/modules/lm_prediction_module.ts @@ -26,7 +26,7 @@ import {computed, observable} from 'mobx'; import {LitModule} from '../core/lit_module'; import {TextSegment, Tokens, TokenTopKPreds} from '../lib/lit_types'; import {styles as sharedStyles} from '../lib/shared_styles.css'; -import {IndexedInput, ModelInfoMap, Spec, TopKResult} from '../lib/types'; +import {type IndexedInput, ModelInfoMap, Spec, TopKResult} from '../lib/types'; import {findMatchingIndices, findSpecKeys, makeModifiedInput, replaceNth} from '../lib/utils'; import {styles} from './lm_prediction_module.css'; diff --git a/lit_nlp/client/modules/metrics_module.ts b/lit_nlp/client/modules/metrics_module.ts index daa00dd9..ebd6e0ce 100644 --- a/lit_nlp/client/modules/metrics_module.ts +++ b/lit_nlp/client/modules/metrics_module.ts @@ -30,7 +30,7 @@ import {MetricBestValue, MetricResult} from '../lib/lit_types'; import {styles as sharedStyles} from '../lib/shared_styles.css'; import {CallConfig, FacetMap, IndexedInput, ModelInfoMap, Spec} from '../lib/types'; import {MetricsResponse, MetricsValues} from '../services/api_service'; -import {GroupService, NumericFeatureBins} from '../services/group_service'; +import {GroupService, type NumericFeatureBins} from '../services/group_service'; import {ClassificationService, SliceService} from '../services/services'; // A dict of metrics type to the MetricsValues for one metric generator. diff --git a/lit_nlp/client/modules/regression_module.ts b/lit_nlp/client/modules/regression_module.ts index e438b7d5..ad85efb0 100644 --- a/lit_nlp/client/modules/regression_module.ts +++ b/lit_nlp/client/modules/regression_module.ts @@ -25,7 +25,7 @@ import {LitModule} from '../core/lit_module'; import {TableData} from '../elements/table'; import {styles as sharedStyles} from '../lib/shared_styles.css'; import {RegressionScore} from '../lib/lit_types'; -import {IndexedInput, ModelInfoMap, RegressionResults, Spec} from '../lib/types'; +import {IndexedInput, ModelInfoMap, type RegressionResults, Spec} from '../lib/types'; import {doesOutputSpecContain, findSpecKeys} from '../lib/utils'; import {CalculatedColumnType} from '../services/data_service'; import {DataService} from '../services/services'; diff --git a/lit_nlp/client/modules/salience_map_module.ts b/lit_nlp/client/modules/salience_map_module.ts index cdd8d473..c05cbae3 100644 --- a/lit_nlp/client/modules/salience_map_module.ts +++ b/lit_nlp/client/modules/salience_map_module.ts @@ -37,7 +37,7 @@ import {InterpreterClick} from '../elements/interpreter_controls'; import {TokenWithWeight} from '../elements/token_chips'; import {FeatureSalience, FieldMatcher, ImageGradients, ImageSalience, LitTypeTypesList, LitTypeWithParent, MulticlassPreds, RegressionScore, Salience, SalienceTargetInfo, TokenGradients, TokenSalience, FrameSalience} from '../lib/lit_types'; import {styles as sharedStyles} from '../lib/shared_styles.css'; -import {CallConfig, IndexedInput, ModelInfoMap, Preds, SCROLL_SYNC_CSS_CLASS, Spec} from '../lib/types'; +import {CallConfig, type IndexedInput, ModelInfoMap, type Preds, SCROLL_SYNC_CSS_CLASS, Spec} from '../lib/types'; import {argmax, cloneSpec, findSpecKeys, makeModifiedInput} from '../lib/utils'; import {SalienceCmap, SignedSalienceCmap, UnsignedSalienceCmap} from '../services/color_service'; import {FocusService} from '../services/focus_service'; diff --git a/lit_nlp/client/modules/sequence_salience_module.ts b/lit_nlp/client/modules/sequence_salience_module.ts index 18aa46e3..a18af539 100644 --- a/lit_nlp/client/modules/sequence_salience_module.ts +++ b/lit_nlp/client/modules/sequence_salience_module.ts @@ -16,10 +16,10 @@ import {LegendType} from '../elements/color_legend'; import {TokenWithWeight} from '../elements/token_chips'; import {SignedSalienceCmap, UnsignedSalienceCmap} from '../lib/colors'; import {SequenceSalienceMap} from '../lib/dtypes'; -import {canonicalizeGenerationResults, GeneratedTextResult, GENERATION_TYPES, getAllTargetOptions, TargetOption} from '../lib/generated_text_utils'; +import {canonicalizeGenerationResults, type GeneratedTextResult, GENERATION_TYPES, getAllTargetOptions, TargetOption} from '../lib/generated_text_utils'; import {Salience} from '../lib/lit_types'; import {styles as sharedStyles} from '../lib/shared_styles.css'; -import {IndexedInput, ModelInfoMap, Spec} from '../lib/types'; +import {type IndexedInput, ModelInfoMap, type Spec} from '../lib/types'; import {sumArray} from '../lib/utils'; import {styles} from './sequence_salience_module.css'; diff --git a/lit_nlp/client/modules/tda_module.ts b/lit_nlp/client/modules/tda_module.ts index 03ef9b51..461d24b3 100644 --- a/lit_nlp/client/modules/tda_module.ts +++ b/lit_nlp/client/modules/tda_module.ts @@ -28,10 +28,10 @@ import {computed, observable} from 'mobx'; import {app} from '../core/app'; import {LitModule} from '../core/lit_module'; import {TableData, TableEntry} from '../elements/table'; -import {canonicalizeGenerationResults, GeneratedTextResult, GENERATION_TYPES, getAllOutputTexts, getFlatTexts} from '../lib/generated_text_utils'; +import {canonicalizeGenerationResults, type GeneratedTextResult, GENERATION_TYPES, getAllOutputTexts, getFlatTexts} from '../lib/generated_text_utils'; import {FieldMatcher, InfluentialExamples, LitTypeWithParent} from '../lib/lit_types'; import {styles as sharedStyles} from '../lib/shared_styles.css'; -import {CallConfig, ComponentInfoMap, IndexedInput, Input, ModelInfoMap, Spec} from '../lib/types'; +import {CallConfig, ComponentInfoMap, type IndexedInput, type Input, ModelInfoMap, Spec} from '../lib/types'; import {cloneSpec, filterToKeys, findSpecKeys, makeModifiedInput} from '../lib/utils'; import {AppState, SelectionService} from '../services/services';