KEMBAR78
Add an async /evaluate endpoint to trigger evaluation jobs on a remote cluster by AnuradhaKaruppiah · Pull Request #109 · NVIDIA/NeMo-Agent-Toolkit · GitHub
Skip to content

Conversation

@AnuradhaKaruppiah
Copy link
Contributor

@AnuradhaKaruppiah AnuradhaKaruppiah commented Apr 9, 2025

Description

Sample Usage:

  1. Start the workflow service on any cluster via aiq serve-
aiq serve --config_file=examples/simple/configs/config.yml
  1. Send evaluation request to it using a separate (or same) eval_config file -
    That will return immediately with a job id. The job is run as a background task
curl --request POST   --url http://localhost:8000/evaluate   --header 'Content-Type: application/json'   --data '{
    "config_file": "examples/simple/configs/eval_config.yml"
}'
{"job_id":"551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d","status":"submitted"}
  1. You can then query the status by using the job-id or my asking for the status of the last (created) job -
curl --request GET --url http://localhost:8000/evaluate/job/last |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   242  100   242    0     0    204      0  0:00:01  0:00:01 --:--:--   204
{
  "job_id": "551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d",
  "status": "running",
  "config_file": "examples/simple/configs/eval_config.yml",
  "error": null,
  "output_path": "None",
  "created_at": "2025-04-10T03:56:43.931778",
  "updated_at": "2025-04-10T03:56:43.933886"
}
curl --request GET --url http://localhost:8000/evaluate/job/551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   283  100   283    0     0     74      0  0:00:03  0:00:03 --:--:--    74
{
  "job_id": "551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d",
  "status": "success",
  "config_file": "examples/simple/configs/eval_config.yml",
  "error": null,
  "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
  "created_at": "2025-04-10T03:56:43.931778",
  "updated_at": "2025-04-10T03:57:11.722188"
}
  1. You can get a complete list of jobs by running -
curl --request GET --url http://localhost:8000/evaluate/jobs | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   569  100   569    0     0  47535      0 --:--:-- --:--:-- --:--:-- 56900
[
  {
    "job_id": "a62086d3-3373-485f-95b1-80e0477fac6b",
    "status": "success",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
    "created_at": "2025-04-10T04:43:29.741201",
    "updated_at": "2025-04-10T04:43:58.451151"
  },
  {
    "job_id": "a5a11719-cd8d-468d-b1c2-9855ab2e9927",
    "status": "success",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
    "created_at": "2025-04-10T04:43:35.432887",
    "updated_at": "2025-04-10T04:44:04.429978"
  }
]

This endpoint allows you to filter by status -

curl http://localGET --url http://localhost:8000/evaluate/jobs?status=running |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   244  100   244    0     0   3870      0 --:--:-- --:--:-- --:--:--  3935
[
  {
    "job_id": "1cff39fe-bedb-4089-9034-50377abc8f6b",
    "status": "running",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": "None",
    "created_at": "2025-04-10T04:45:06.708431",
    "updated_at": "2025-04-10T04:45:06.710928"
  }
]

Closes: #100

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.

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Also update status

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
@AnuradhaKaruppiah AnuradhaKaruppiah requested a review from a team as a code owner April 9, 2025 22:20
@AnuradhaKaruppiah AnuradhaKaruppiah marked this pull request as draft April 9, 2025 22:20
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Also allow user to specify the job id

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
@AnuradhaKaruppiah AnuradhaKaruppiah added feature request New feature or request non-breaking Non-breaking change labels Apr 10, 2025
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
This is a minor optimization to prevent the periodic check.

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
@AnuradhaKaruppiah AnuradhaKaruppiah marked this pull request as ready for review April 11, 2025 02:30
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
@AnuradhaKaruppiah
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit af05dc9 into NVIDIA:develop Apr 11, 2025
10 checks passed
ericevans-nv pushed a commit to ericevans-nv/agent-iq that referenced this pull request Apr 14, 2025
…e cluster (NVIDIA#109)

Sample Usage:
1. Start the workflow service on any cluster via `aiq serve`-
```
aiq serve --config_file=examples/simple/configs/config.yml
```
2. Send evaluation request to it using a separate (or same) eval_config file -
That will return immediately with a job id. The job is run as a background task
```
curl --request POST   --url http://localhost:8000/evaluate   --header 'Content-Type: application/json'   --data '{
    "config_file": "examples/simple/configs/eval_config.yml"
}'
{"job_id":"551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d","status":"submitted"}
```
3. You can then query the status by using the job-id or my asking for the status of the last (created) job -
```
curl --request GET --url http://localhost:8000/evaluate/job/last |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   242  100   242    0     0    204      0  0:00:01  0:00:01 --:--:--   204
{
  "job_id": "551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d",
  "status": "running",
  "config_file": "examples/simple/configs/eval_config.yml",
  "error": null,
  "output_path": "None",
  "created_at": "2025-04-10T03:56:43.931778",
  "updated_at": "2025-04-10T03:56:43.933886"
}
```
```
curl --request GET --url http://localhost:8000/evaluate/job/551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   283  100   283    0     0     74      0  0:00:03  0:00:03 --:--:--    74
{
  "job_id": "551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d",
  "status": "success",
  "config_file": "examples/simple/configs/eval_config.yml",
  "error": null,
  "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
  "created_at": "2025-04-10T03:56:43.931778",
  "updated_at": "2025-04-10T03:57:11.722188"
}
```
4. You can get a complete list of jobs by running -
```
curl --request GET --url http://localhost:8000/evaluate/jobs | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   569  100   569    0     0  47535      0 --:--:-- --:--:-- --:--:-- 56900
[
  {
    "job_id": "a62086d3-3373-485f-95b1-80e0477fac6b",
    "status": "success",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
    "created_at": "2025-04-10T04:43:29.741201",
    "updated_at": "2025-04-10T04:43:58.451151"
  },
  {
    "job_id": "a5a11719-cd8d-468d-b1c2-9855ab2e9927",
    "status": "success",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
    "created_at": "2025-04-10T04:43:35.432887",
    "updated_at": "2025-04-10T04:44:04.429978"
  }
]
```
This endpoint allows you to filter by status -
```
curl http://localGET --url http://localhost:8000/evaluate/jobs?status=running |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   244  100   244    0     0   3870      0 --:--:-- --:--:-- --:--:--  3935
[
  {
    "job_id": "1cff39fe-bedb-4089-9034-50377abc8f6b",
    "status": "running",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": "None",
    "created_at": "2025-04-10T04:45:06.708431",
    "updated_at": "2025-04-10T04:45:06.710928"
  }
]
```

Closes: NVIDIA#100

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AgentIQ/blob/develop/docs/source/advanced/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:
  - Eric Evans II (https://github.com/ericevans-nv)
  - David Gardner (https://github.com/dagardner-nv)

URL: NVIDIA#109
Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
yczhang-nv pushed a commit to yczhang-nv/NeMo-Agent-Toolkit that referenced this pull request Apr 21, 2025
…e cluster (NVIDIA#109)

Sample Usage:
1. Start the workflow service on any cluster via `aiq serve`-
```
aiq serve --config_file=examples/simple/configs/config.yml
```
2. Send evaluation request to it using a separate (or same) eval_config file -
That will return immediately with a job id. The job is run as a background task
```
curl --request POST   --url http://localhost:8000/evaluate   --header 'Content-Type: application/json'   --data '{
    "config_file": "examples/simple/configs/eval_config.yml"
}'
{"job_id":"551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d","status":"submitted"}
```
3. You can then query the status by using the job-id or my asking for the status of the last (created) job -
```
curl --request GET --url http://localhost:8000/evaluate/job/last |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   242  100   242    0     0    204      0  0:00:01  0:00:01 --:--:--   204
{
  "job_id": "551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d",
  "status": "running",
  "config_file": "examples/simple/configs/eval_config.yml",
  "error": null,
  "output_path": "None",
  "created_at": "2025-04-10T03:56:43.931778",
  "updated_at": "2025-04-10T03:56:43.933886"
}
```
```
curl --request GET --url http://localhost:8000/evaluate/job/551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   283  100   283    0     0     74      0  0:00:03  0:00:03 --:--:--    74
{
  "job_id": "551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d",
  "status": "success",
  "config_file": "examples/simple/configs/eval_config.yml",
  "error": null,
  "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
  "created_at": "2025-04-10T03:56:43.931778",
  "updated_at": "2025-04-10T03:57:11.722188"
}
```
4. You can get a complete list of jobs by running -
```
curl --request GET --url http://localhost:8000/evaluate/jobs | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   569  100   569    0     0  47535      0 --:--:-- --:--:-- --:--:-- 56900
[
  {
    "job_id": "a62086d3-3373-485f-95b1-80e0477fac6b",
    "status": "success",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
    "created_at": "2025-04-10T04:43:29.741201",
    "updated_at": "2025-04-10T04:43:58.451151"
  },
  {
    "job_id": "a5a11719-cd8d-468d-b1c2-9855ab2e9927",
    "status": "success",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
    "created_at": "2025-04-10T04:43:35.432887",
    "updated_at": "2025-04-10T04:44:04.429978"
  }
]
```
This endpoint allows you to filter by status -
```
curl http://localGET --url http://localhost:8000/evaluate/jobs?status=running |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   244  100   244    0     0   3870      0 --:--:-- --:--:-- --:--:--  3935
[
  {
    "job_id": "1cff39fe-bedb-4089-9034-50377abc8f6b",
    "status": "running",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": "None",
    "created_at": "2025-04-10T04:45:06.708431",
    "updated_at": "2025-04-10T04:45:06.710928"
  }
]
```

Closes: NVIDIA#100

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AgentIQ/blob/develop/docs/source/advanced/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:
  - Eric Evans II (https://github.com/ericevans-nv)
  - David Gardner (https://github.com/dagardner-nv)

URL: NVIDIA#109
Signed-off-by: Yuchen Zhang <134643420+yczhang-nv@users.noreply.github.com>
@AnuradhaKaruppiah AnuradhaKaruppiah deleted the evaluate-endpoint branch May 6, 2025 00:48
yczhang-nv pushed a commit to yczhang-nv/NeMo-Agent-Toolkit that referenced this pull request May 8, 2025
…e cluster (NVIDIA#109)

Sample Usage:
1. Start the workflow service on any cluster via `aiq serve`-
```
aiq serve --config_file=examples/simple/configs/config.yml
```
2. Send evaluation request to it using a separate (or same) eval_config file -
That will return immediately with a job id. The job is run as a background task
```
curl --request POST   --url http://localhost:8000/evaluate   --header 'Content-Type: application/json'   --data '{
    "config_file": "examples/simple/configs/eval_config.yml"
}'
{"job_id":"551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d","status":"submitted"}
```
3. You can then query the status by using the job-id or my asking for the status of the last (created) job -
```
curl --request GET --url http://localhost:8000/evaluate/job/last |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   242  100   242    0     0    204      0  0:00:01  0:00:01 --:--:--   204
{
  "job_id": "551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d",
  "status": "running",
  "config_file": "examples/simple/configs/eval_config.yml",
  "error": null,
  "output_path": "None",
  "created_at": "2025-04-10T03:56:43.931778",
  "updated_at": "2025-04-10T03:56:43.933886"
}
```
```
curl --request GET --url http://localhost:8000/evaluate/job/551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   283  100   283    0     0     74      0  0:00:03  0:00:03 --:--:--    74
{
  "job_id": "551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d",
  "status": "success",
  "config_file": "examples/simple/configs/eval_config.yml",
  "error": null,
  "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
  "created_at": "2025-04-10T03:56:43.931778",
  "updated_at": "2025-04-10T03:57:11.722188"
}
```
4. You can get a complete list of jobs by running -
```
curl --request GET --url http://localhost:8000/evaluate/jobs | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   569  100   569    0     0  47535      0 --:--:-- --:--:-- --:--:-- 56900
[
  {
    "job_id": "a62086d3-3373-485f-95b1-80e0477fac6b",
    "status": "success",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
    "created_at": "2025-04-10T04:43:29.741201",
    "updated_at": "2025-04-10T04:43:58.451151"
  },
  {
    "job_id": "a5a11719-cd8d-468d-b1c2-9855ab2e9927",
    "status": "success",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
    "created_at": "2025-04-10T04:43:35.432887",
    "updated_at": "2025-04-10T04:44:04.429978"
  }
]
```
This endpoint allows you to filter by status -
```
curl http://localGET --url http://localhost:8000/evaluate/jobs?status=running |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   244  100   244    0     0   3870      0 --:--:-- --:--:-- --:--:--  3935
[
  {
    "job_id": "1cff39fe-bedb-4089-9034-50377abc8f6b",
    "status": "running",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": "None",
    "created_at": "2025-04-10T04:45:06.708431",
    "updated_at": "2025-04-10T04:45:06.710928"
  }
]
```

Closes: NVIDIA#100

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AgentIQ/blob/develop/docs/source/advanced/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:
  - Eric Evans II (https://github.com/ericevans-nv)
  - David Gardner (https://github.com/dagardner-nv)

URL: NVIDIA#109
Signed-off-by: Yuchen Zhang <134643420+yczhang-nv@users.noreply.github.com>
AnuradhaKaruppiah added a commit to AnuradhaKaruppiah/oss-agentiq that referenced this pull request Aug 4, 2025
…e cluster (NVIDIA#109)

Sample Usage:
1. Start the workflow service on any cluster via `aiq serve`-
```
aiq serve --config_file=examples/simple/configs/config.yml
```
2. Send evaluation request to it using a separate (or same) eval_config file -
That will return immediately with a job id. The job is run as a background task 
```
curl --request POST   --url http://localhost:8000/evaluate   --header 'Content-Type: application/json'   --data '{
    "config_file": "examples/simple/configs/eval_config.yml"
}'
{"job_id":"551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d","status":"submitted"}
```
3. You can then query the status by using the job-id or my asking for the status of the last (created) job -
```
curl --request GET --url http://localhost:8000/evaluate/job/last |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   242  100   242    0     0    204      0  0:00:01  0:00:01 --:--:--   204
{
  "job_id": "551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d",
  "status": "running",
  "config_file": "examples/simple/configs/eval_config.yml",
  "error": null,
  "output_path": "None",
  "created_at": "2025-04-10T03:56:43.931778",
  "updated_at": "2025-04-10T03:56:43.933886"
}
```
```
curl --request GET --url http://localhost:8000/evaluate/job/551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   283  100   283    0     0     74      0  0:00:03  0:00:03 --:--:--    74
{
  "job_id": "551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d",
  "status": "success",
  "config_file": "examples/simple/configs/eval_config.yml",
  "error": null,
  "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
  "created_at": "2025-04-10T03:56:43.931778",
  "updated_at": "2025-04-10T03:57:11.722188"
}
```
4. You can get a complete list of jobs by running -
```
curl --request GET --url http://localhost:8000/evaluate/jobs | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   569  100   569    0     0  47535      0 --:--:-- --:--:-- --:--:-- 56900
[
  {
    "job_id": "a62086d3-3373-485f-95b1-80e0477fac6b",
    "status": "success",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
    "created_at": "2025-04-10T04:43:29.741201",
    "updated_at": "2025-04-10T04:43:58.451151"
  },
  {
    "job_id": "a5a11719-cd8d-468d-b1c2-9855ab2e9927",
    "status": "success",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
    "created_at": "2025-04-10T04:43:35.432887",
    "updated_at": "2025-04-10T04:44:04.429978"
  }
]
```
This endpoint allows you to filter by status -
```
curl http://localGET --url http://localhost:8000/evaluate/jobs?status=running |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   244  100   244    0     0   3870      0 --:--:-- --:--:-- --:--:--  3935
[
  {
    "job_id": "1cff39fe-bedb-4089-9034-50377abc8f6b",
    "status": "running",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": "None",
    "created_at": "2025-04-10T04:45:06.708431",
    "updated_at": "2025-04-10T04:45:06.710928"
  }
]
```

Closes: NVIDIA#100

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AgentIQ/blob/develop/docs/source/advanced/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:
  - Eric Evans II (https://github.com/ericevans-nv)
  - David Gardner (https://github.com/dagardner-nv)

URL: NVIDIA#109
scheckerNV pushed a commit to scheckerNV/aiq-factory-reset that referenced this pull request Aug 22, 2025
…e cluster (NVIDIA#109)

Sample Usage:
1. Start the workflow service on any cluster via `aiq serve`-
```
aiq serve --config_file=examples/simple/configs/config.yml
```
2. Send evaluation request to it using a separate (or same) eval_config file -
That will return immediately with a job id. The job is run as a background task 
```
curl --request POST   --url http://localhost:8000/evaluate   --header 'Content-Type: application/json'   --data '{
    "config_file": "examples/simple/configs/eval_config.yml"
}'
{"job_id":"551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d","status":"submitted"}
```
3. You can then query the status by using the job-id or my asking for the status of the last (created) job -
```
curl --request GET --url http://localhost:8000/evaluate/job/last |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   242  100   242    0     0    204      0  0:00:01  0:00:01 --:--:--   204
{
  "job_id": "551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d",
  "status": "running",
  "config_file": "examples/simple/configs/eval_config.yml",
  "error": null,
  "output_path": "None",
  "created_at": "2025-04-10T03:56:43.931778",
  "updated_at": "2025-04-10T03:56:43.933886"
}
```
```
curl --request GET --url http://localhost:8000/evaluate/job/551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   283  100   283    0     0     74      0  0:00:03  0:00:03 --:--:--    74
{
  "job_id": "551d181a-3e3c-4a1c-95b4-a4dde2f8aa3d",
  "status": "success",
  "config_file": "examples/simple/configs/eval_config.yml",
  "error": null,
  "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
  "created_at": "2025-04-10T03:56:43.931778",
  "updated_at": "2025-04-10T03:57:11.722188"
}
```
4. You can get a complete list of jobs by running -
```
curl --request GET --url http://localhost:8000/evaluate/jobs | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   569  100   569    0     0  47535      0 --:--:-- --:--:-- --:--:-- 56900
[
  {
    "job_id": "a62086d3-3373-485f-95b1-80e0477fac6b",
    "status": "success",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
    "created_at": "2025-04-10T04:43:29.741201",
    "updated_at": "2025-04-10T04:43:58.451151"
  },
  {
    "job_id": "a5a11719-cd8d-468d-b1c2-9855ab2e9927",
    "status": "success",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": ".tmp/aiq/examples/simple/workflow_output.json",
    "created_at": "2025-04-10T04:43:35.432887",
    "updated_at": "2025-04-10T04:44:04.429978"
  }
]
```
This endpoint allows you to filter by status -
```
curl http://localGET --url http://localhost:8000/evaluate/jobs?status=running |jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   244  100   244    0     0   3870      0 --:--:-- --:--:-- --:--:--  3935
[
  {
    "job_id": "1cff39fe-bedb-4089-9034-50377abc8f6b",
    "status": "running",
    "config_file": "examples/simple/configs/eval_config.yml",
    "error": null,
    "output_path": "None",
    "created_at": "2025-04-10T04:45:06.708431",
    "updated_at": "2025-04-10T04:45:06.710928"
  }
]
```

Closes: NVIDIA#100

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AgentIQ/blob/develop/docs/source/advanced/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:
  - Eric Evans II (https://github.com/ericevans-nv)
  - David Gardner (https://github.com/dagardner-nv)

URL: NVIDIA#109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request New feature or request non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA]: Provide an endpoint for running evaluation

3 participants