Repository navigation
[ML] Testing trained models in UI - #128359
Conversation
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
Pinging @elastic/ml-ui (:ml) |
| RAW, | ||
| } | ||
|
|
||
| export const NerModel: FC<Props> = ({ model }) => { |
There was a problem hiding this comment.
This component looks very similar to the LandIdent one. I presume we should create a reusable component instead.
| entity: estypes.MlTrainedModelEntities | null; | ||
| }>; | ||
|
|
||
| export class NerInference { |
There was a problem hiding this comment.
similar to the Lang Ident, I think it should be a Kibana endpoint
peteharverson
left a comment
There was a problem hiding this comment.
Tested locally, and overall works really well! Left a few comments.
| id="xpack.ml.trainedModels.testModelsFlyout.ner.output.probabilityTitle" | ||
| defaultMessage="Probability" | ||
| /> | ||
| : {entity.class_probability} |
There was a problem hiding this comment.
Again with the exact value shown in the 'Raw output' tab. I'd consider formatting this to say 3 sigfigs.
| return 'Location'; | ||
|
|
||
| default: | ||
| return 'cross'; |
There was a problem hiding this comment.
Updated in a012a58
MISC entities are now show like this:
Unknown entries will have the type Unknown and the same ? icon
| } catch (e) { | ||
| setIsRunning(false); | ||
| setOutput(null); | ||
| setErrorText(extractErrorMessage(e)); |
There was a problem hiding this comment.
Is it worth checking the length of text entered, as with even a few lines of text I am getting a timeout [10s] waiting for inference result error.
There was a problem hiding this comment.
Increasing to 30s has helped on my setup, although with long passages of text I am finding the network request stays in a pending state and never seems to time out.
|
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
peteharverson
left a comment
There was a problem hiding this comment.
Tested latest changes and LGTM.
As discussed, looks like the Elasticsearch side is not timing out properly when I try and pass a long string text when testing the NER model.
* [ML] Testing trained models in UI * folder rename * code clean up * translations * adding comments * endpoint comments * small changes based on review * removing testing text * refactoring to remove duplicate code * changing misc entities * probably is now 3 sig figs * class refactor * another refactor * fixing enitiy highlighting * adding infer timeout * show class name for known types * refactoring highlighting * moving unknown entity type * removing default badge tooltips * fixing linting error * small import changes Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Adds the ability to test some trained models using user specified input.
Currently supported models:
This PR adds a wrapper for the es ingest pipeline simulate endpoint.
This has been added to ML because there is no simulate function shared from the ingest pipeline plugin. Also the endpoint supplied in the ingest pipeline plugin renames the
docsparameter todocumentsmaking it incorrect if the user wished to copy the payload.Action to open the testing flyout

Pytorch testing flyout

Lang ident testing flyout

Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
Unit or functional tests were updated or added to match the most common scenarios
This was checked for breaking API changes and was labeled appropriately