opensearch-project / dashboards-flow-framework

A UI designer for constructing AI applications with OpenSearch
Apache License 2.0
9 stars 6 forks source link

Automatically populate model inputs/outputs if applicable #254

Closed ohltyler closed 1 month ago

ohltyler commented 1 month ago

Description

This PR adds integration with ML commons optional model interfaces parameter. It is used in the MLProcessorInputs component in a few ways:

  1. Show a warning callout if the selected model does not have any associated model interface
  2. Dynamically render the input map / output map forms; if an interface is found, automatically populate available options for model inputs / model outputs. If no interface is found, leave as free-form text input fields.

More implementation details:

Demo video, showing how the form looks for a model with an interface, and without. The model with an interface automatically populates the maps' input fields and output fields based on the interface definition. The model without an interface has a warning modal, and free-form text inputs for configuring the input maps / output maps: (note: placeholders for the free-form text fields were added after video was recorded)

screen-capture (15).webm

Note: will have future PRs to automatically populate doc / query fields as well.

Issues Resolved

Makes progress on #23 Resolves #218

Check List

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.