class Config(Task.Config): model: SeqNNModel.Config = SeqNNModel.Config() trainer: Trainer.Config = Trainer.Config() labels: DocLabelConfig = DocLabelConfig() data_handler: SeqModelDataHandler.Config = SeqModelDataHandler.Config() metric_reporter: ClassificationMetricReporter.Config = ( ClassificationMetricReporter.Config())
class Config(Task_Deprecated.Config): model: SeqNNModel_Deprecated.Config = SeqNNModel_Deprecated.Config() trainer: Trainer.Config = Trainer.Config() labels: DocLabelConfig = DocLabelConfig() data_handler: SeqModelDataHandler.Config = SeqModelDataHandler.Config() metric_reporter: ClassificationMetricReporter.Config = ( ClassificationMetricReporter.Config()) exporter: Optional[DenseFeatureExporter.Config] = None
def setUp(self): self.train_data = [{ DFColumn.DOC_LABEL: "cu:discuss_where", DFColumn.UTTERANCE: '["where do you wanna meet?", "MPK"]', }] self.eval_data = [ { DFColumn.DOC_LABEL: "cu:discuss_where", DFColumn.UTTERANCE: '["how about SF?", "sounds good"]', }, { DFColumn.DOC_LABEL: "cu:other", DFColumn.UTTERANCE: '["lol"]' }, ] self.test_data = [ { DFColumn.DOC_LABEL: "cu:discuss_where", DFColumn.UTTERANCE: '["MPK sounds good to me"]', }, { DFColumn.DOC_LABEL: "cu:other", DFColumn.UTTERANCE: '["great", "awesome"]', }, ] self.dh = SeqModelDataHandler.from_config( SeqModelDataHandler.Config(), FeatureConfig(), DocLabelConfig(), featurizer=SimpleFeaturizer.from_config(SimpleFeaturizer.Config(), FeatureConfig()), )