[ML] Adds trained model testing for additional pytorch models#129209
[ML] Adds trained model testing for additional pytorch models#129209jgowdyelastic merged 33 commits intoelastic:mainfrom
Conversation
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
Pinging @elastic/ml-ui (:ml) |
| import React, { FC } from 'react'; | ||
| import { Observable } from 'rxjs'; | ||
| import useObservable from 'react-use/lib/useObservable'; | ||
| import { MLJobEditor } from '../../../../jobs/jobs_list/components/ml_job_editor'; |
There was a problem hiding this comment.
As this wrapper around the Ace editor is now used in places other than for jobs, would be good to rename it in a follow-up.
|
|
||
| const LangIdentOutput: FC<{ inferrer: LangIdentInference }> = ({ inferrer }) => { | ||
| const result = useObservable(inferrer.inferenceResult$); | ||
| if (!result) { |
There was a problem hiding this comment.
Couldn't this and the condition on line 28 be in the same block as they both return null?
alvarezmelissa87
left a comment
There was a problem hiding this comment.
Left a small comment but code LGTM ⚡
| <LangIdentOutput inferrer={inferrer} /> | ||
| ); | ||
|
|
||
| const LangIdentOutput: FC<{ inferrer: LangIdentInference }> = ({ inferrer }) => { |
| protected abstract getInputComponent(): JSX.Element; | ||
| protected abstract getOutputComponent(): JSX.Element; | ||
|
|
||
| protected abstract infer(): Promise<TInferResponse>; |
peteharverson
left a comment
There was a problem hiding this comment.
Latest changes LGTM
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
* [ML] Fixing text classification testing in the UI * disabling unsupported models * code clean up * small refactor * adding zero shot classification * translation id * adding text embedding * adding fill_mask * translation id * code clean up * adding observable for inference * refactoring for observables * removing comment * refactor * removing num_top_classes override * adding optional num_top_classes * translations * removing any * updating error type * removing any type * correcting type * combining checks * fixing lang ident * added start check Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>



Adds trained model testing UI for remaining pytorch models.:
fill_mask,text_classification,text_embeddingandzero_shot_classificationFollows on from #128359
Also refactors the code to make the components more reusable.
Fill mask
Text classification
Text embedding
Zero shot classification
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
Any UI touched in this PR is usable by keyboard only (learn more about keyboard accessibility)
This was checked for breaking API changes and was labeled appropriately