[ML] Testing trained models in UI#128359
Conversation
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
Pinging @elastic/ml-ui (:ml) |
x-pack/plugins/ml/public/application/trained_models/models_management/models_list.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/ml/public/application/trained_models/models_management/models_list.tsx
Outdated
Show resolved
Hide resolved
...ic/application/trained_models/models_management/test_models/models/lang_ident/lang_ident.tsx
Outdated
Show resolved
Hide resolved
...ic/application/trained_models/models_management/test_models/models/lang_ident/lang_ident.tsx
Outdated
Show resolved
Hide resolved
...ic/application/trained_models/models_management/test_models/models/lang_ident/lang_ident.tsx
Outdated
Show resolved
Hide resolved
| 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
...ml/public/application/trained_models/models_management/test_models/models/ner/ner_output.tsx
Outdated
Show resolved
Hide resolved
...ml/public/application/trained_models/models_management/test_models/models/ner/ner_output.tsx
Outdated
Show resolved
Hide resolved
...ml/public/application/trained_models/models_management/test_models/models/ner/ner_output.tsx
Outdated
Show resolved
Hide resolved
peteharverson
left a comment
There was a problem hiding this comment.
Tested locally, and overall works really well! Left a few comments.
...ic/application/trained_models/models_management/test_models/models/lang_ident/lang_ident.tsx
Outdated
Show resolved
Hide resolved
...lugins/ml/public/application/trained_models/models_management/test_models/models/ner/ner.tsx
Outdated
Show resolved
Hide resolved
...ication/trained_models/models_management/test_models/models/lang_ident/lang_ident_output.tsx
Show resolved
Hide resolved
| 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.
...ml/public/application/trained_models/models_management/test_models/models/ner/ner_output.tsx
Outdated
Show resolved
Hide resolved
| 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.

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