Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support relevant form toggling in advanced transform modals #385

Merged
merged 4 commits into from
Sep 17, 2024

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Sep 17, 2024

Description

This PR adds specific, relevant forms to be exposed in the advanced transform modals, such that users can toggle and test directly within the modal, instead of navigating to/from the advanced settings fields. Specifically:

  • exposes one_to_one toggling on INPUT transform for SEARCH RESPONSE only. This changes what the source input will be (single value vs. array of values)
  • exposes full_response_path toggling on OUTPUT transforms for INGEST / SEARCH RESPONSE only. This changes what the source output will be (nested model response vs. full model response)

More details

  • adds visual support for the default many-to-one behavior on input transform (when one_to_one is false). In this scenario, we collapse the values from all of the documents into a single list, to pass as a single parameter for one inference call via the ML processor
  • updates generateTransform to support the above use case ^
  • exposes override field for search resp processor
  • limits input docs to the input transform, to be 10
  • resets form inputs when form values are toggled

Demo video, showing one_to_one toggling on the input transform, and full_response_path toggling on the output transform. Note the model input selector in the output field changes from a selector when false, to a freeform text when true. This is because when it is true, the full model response path is passed, and users must write custom JSON path to parse out the relevant values they need.

screen-capture.24.webm

Issues Resolved

Resolves #367

Check List

  • Commits are signed per the DCO using --signoff

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.

@ohltyler ohltyler changed the title Support one-to-one/many-to-one toggling; add relevant forms in transform modals Support relevant form toggling in advanced transform modals Sep 17, 2024
@ohltyler ohltyler marked this pull request as ready for review September 17, 2024 17:17
Copy link
Collaborator

@saimedhi saimedhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Changes Looks good to me. From the UI, one_to_one toggling on the input transform, and full_response_path toggling on the output transform seem to work rightly. Thank you, Tyler.

@saimedhi saimedhi merged commit 4e2445d into opensearch-project:main Sep 17, 2024
9 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 17, 2024
* Support one-to-one on input

Signed-off-by: Tyler Ohlsen <[email protected]>

* dynamic description; add field; add input docs limit

Signed-off-by: Tyler Ohlsen <[email protected]>

* expose onetoone on input transform (search resp)

Signed-off-by: Tyler Ohlsen <[email protected]>

* Onboard full_response_path for output (ingest, search resp)

Signed-off-by: Tyler Ohlsen <[email protected]>

---------

Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit 4e2445d)
@ohltyler ohltyler deleted the advanced-toggles branch September 17, 2024 23:40
ohltyler added a commit that referenced this pull request Sep 17, 2024
)


Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit 4e2445d)

Co-authored-by: Tyler Ohlsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support many-to-one in output transform modals for ML search response processors
2 participants