Skip to content

Commit

Permalink
[ML] Remove noisy 'Could not find trained model' message (elastic#100760
Browse files Browse the repository at this point in the history
)

A 'Could not find trained model' was logged when a new ingest pipeline
using a inference processor was created but the referenced model could 
not be found. This isn't unusual as it is common to create a pipeline
before the model is loaded. This change does not log the error message
in this situation
  • Loading branch information
davidkyle committed Oct 12, 2023
1 parent d20b45b commit aa6c37c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/changelog/100760.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 100760
summary: Remove noisy 'Could not find trained model' message
area: Machine Learning
type: bug
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,12 @@ private void loadModel(String modelId, Consumer consumer) {
handleLoadFailure(modelId, failure);
}));
}, failure -> {
logger.warn(() -> "[" + modelId + "] failed to load model configuration", failure);
if (consumer != Consumer.PIPELINE) {
// The model loading was triggered by an ingest pipeline change
// referencing a model that cannot be found. This is not an error
// as the model may be put later
logger.warn(() -> "[" + modelId + "] failed to load model configuration ", failure);
}
handleLoadFailure(modelId, failure);
}));
}
Expand Down

0 comments on commit aa6c37c

Please sign in to comment.