Skip to content

multitask

allennlp.predictors.multitask

[SOURCE]


MultiTaskPredictor

@Predictor.register("multitask")
class MultiTaskPredictor(Predictor):
 | def __init__(
 |     self,
 |     model: MultiTaskModel,
 |     dataset_reader: MultiTaskDatasetReader
 | ) -> None

Predictor for multitask models.

Registered as a Predictor with name "multitask".

This predictor is tightly coupled to MultiTaskDatasetReader and MultiTaskModel, and will not work if used with other readers or models.

predict_instance

class MultiTaskPredictor(Predictor):
 | ...
 | def predict_instance(self, instance: Instance) -> JsonDict

predict_batch_instance

class MultiTaskPredictor(Predictor):
 | ...
 | def predict_batch_instance(
 |     self,
 |     instances: List[Instance]
 | ) -> List[JsonDict]