-
Notifications
You must be signed in to change notification settings - Fork 396
Allow non-json string outputs for workflows that use unstructured datasets #396
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
Conversation
…asets Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the JSON-only restriction on unstructured dataset outputs by adding a helper to parse plain strings, JSON strings, and model objects, and updates tests accordingly.
- Added
parse_if_json_stringtopublish_eval_inputto handle multiple output types. - Switched the unstructured case to use the new parser instead of always calling
json.loads. - Introduced new tests in
test_dataset_handler.pyto validate plain strings, JSON strings, Pydantic models, and numeric outputs.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/aiq/eval/dataset_handler/dataset_handler.py | Added parse_if_json_string helper and updated unstructured JSON serialization to use it. |
| tests/aiq/eval/dataset_handler/test_dataset_handler.py | Imported json, EvalInputItem, EvalOutputItem; added make_eval_input_item helper and new test for unstructured outputs. |
Comments suppressed due to low confidence (1)
src/aiq/eval/dataset_handler/dataset_handler.py:155
- The
jsonmodule isn't imported in this file but is used inparse_if_json_string. Please addimport jsonat the top.
def parse_if_json_string(value):
|
/merge |
…asets (NVIDIA#396) Unstructured datasets were expecting json outputs (overfitted to swe-bench datasets). This change removes the restrictions and allows workflows that use unstructured datasets to return any output object. ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing.md). - We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license. - Any contribution which contains commits that are not Signed-Off will not be accepted. - When the PR is ready for review, new or existing tests cover these changes. - When the PR is ready for review, the documentation is up to date with these changes. Authors: - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah) Approvers: - Michael Demoret (https://github.com/mdemoret-nv) URL: NVIDIA#396 Signed-off-by: Matthew Penn <mpenn@nvidia.com>
…asets (NVIDIA#396) Unstructured datasets were expecting json outputs (overfitted to swe-bench datasets). This change removes the restrictions and allows workflows that use unstructured datasets to return any output object. ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing.md). - We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license. - Any contribution which contains commits that are not Signed-Off will not be accepted. - When the PR is ready for review, new or existing tests cover these changes. - When the PR is ready for review, the documentation is up to date with these changes. Authors: - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah) Approvers: - Michael Demoret (https://github.com/mdemoret-nv) URL: NVIDIA#396
…asets (NVIDIA#396) Unstructured datasets were expecting json outputs (overfitted to swe-bench datasets). This change removes the restrictions and allows workflows that use unstructured datasets to return any output object. ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing.md). - We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license. - Any contribution which contains commits that are not Signed-Off will not be accepted. - When the PR is ready for review, new or existing tests cover these changes. - When the PR is ready for review, the documentation is up to date with these changes. Authors: - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah) Approvers: - Michael Demoret (https://github.com/mdemoret-nv) URL: NVIDIA#396
Description
Unstructured datasets were expecting json outputs (overfitted to swe-bench datasets). This change removes the restrictions and allows workflows that use unstructured datasets to return any output object.
By Submitting this PR I confirm: