KEMBAR78
Allow non-json string outputs for workflows that use unstructured datasets by AnuradhaKaruppiah · Pull Request #396 · NVIDIA/NeMo-Agent-Toolkit · GitHub
Skip to content

Conversation

@AnuradhaKaruppiah
Copy link
Contributor

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:

  • I am familiar with the Contributing Guidelines.
  • 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.

…asets

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Copy link
Contributor

Copilot AI left a 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_string to publish_eval_input to 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.py to 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 json module isn't imported in this file but is used in parse_if_json_string. Please add import json at the top.
        def parse_if_json_string(value):

@mdemoret-nv mdemoret-nv added improvement Improvement to existing functionality non-breaking Non-breaking change labels Jun 27, 2025
@AnuradhaKaruppiah
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 9d10586 into NVIDIA:develop Jun 27, 2025
12 checks passed
@AnuradhaKaruppiah AnuradhaKaruppiah deleted the ak-unstructured branch June 27, 2025 14:08
mpenn pushed a commit to mpenn/NeMo-Agent-Toolkit that referenced this pull request Jul 23, 2025
…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>
AnuradhaKaruppiah added a commit to AnuradhaKaruppiah/oss-agentiq that referenced this pull request Aug 4, 2025
…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
scheckerNV pushed a commit to scheckerNV/aiq-factory-reset that referenced this pull request Aug 22, 2025
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement to existing functionality non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants