版本: 8-8.9
简而言之,当Elasticsearch零样本分类模型无法找到任何要分类的数据时,就会出现此错误。这可能是由于索引为空或不存在,或者数据与模型的要求不匹配造成的。要解决此问题,请确保您查询的索引包含数据,并且数据与零样本分类模型兼容。此外,检查查询语法和参数以确保它们正确。如果问题仍然存在,请考虑使用适当的数据重新训练模型。
日志上下文
日志"Zero shot classification result has no data"的类名是 ZeroShotClassificationProcessor.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人使用:
NlpTask.ResultProcessor {
@Override
public InferenceResults processResult(TokenizationResult tokenization, PyTorchInferenceResult pyTorchResult) {
if (pyTorchResult.getInferenceResult().length < 1) {
throw new ElasticsearchStatusException("Zero shot classification result has no data", RestStatus.INTERNAL_SERVER_ERROR);
}
// TODO only the first entry in the batch result is verified and
// checked. Implement for all in batch
if (pyTorchResult.getInferenceResult()[0].length != labels.length) {
throw new ElasticsearchStatusException(





