Skip to content

Conversation

@ayulockin
Copy link
Contributor

@ayulockin ayulockin commented Apr 30, 2025

Description

Closes

This PR adds support tracing of AIQ intemediate steps and the underlying framework (Langchain, CrewAI, etc.) using Weights and Biases Weave platform for better interactivity and off-the-shelf LLMOps life-cycle.

As a user all you need to do is update the config.yaml with the following:

general:
  use_uvloop: true
  telemetry:
    tracing:
      weave:
        _type: weave
        entity: <your-wandb-entity>
        project: my-awesome-genai-app

An example trace timeline logged to Weave:

image

View more traces in this project: https://wandb.ai/ayut/simple_calculator/weave/traces?view=traces_default

cc: @mdemoret-nv

This PR was opened in favor of #135

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.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Apr 30, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ayulockin ayulockin changed the title add weave integration as package Add support for fine-grained tracing using W&B Weave Apr 30, 2025
Signed-off-by: ayulockin <[email protected]>
Signed-off-by: ayulockin <[email protected]>
Signed-off-by: ayulockin <[email protected]>
Signed-off-by: ayulockin <[email protected]>
Signed-off-by: ayulockin <[email protected]>
@ayulockin
Copy link
Contributor Author

hey @mdemoret-nv can you give it a review? I have added documentation as well. :)

@dnandakumar-nv dnandakumar-nv added improvement Improvement to existing functionality non-breaking Non-breaking change labels May 1, 2025
@dnandakumar-nv
Copy link
Contributor

/ok to test 9312d0a

Copy link
Contributor

@dnandakumar-nv dnandakumar-nv left a comment

Choose a reason for hiding this comment

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

This looks good to me. @ayulockin could you please ensure you're passing the CI so we can get this in? Please ensure to rename any references to AgentIQ to AIQToolkit

@AnuradhaKaruppiah
Copy link
Contributor

/ok to test 24ac3e2

@AnuradhaKaruppiah
Copy link
Contributor

/ok to test 24ac3e2

@copy-pr-bot
Copy link

copy-pr-bot bot commented May 1, 2025

/ok to test 24ac3e2

@AnuradhaKaruppiah, there was an error processing your request: E2

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

@AnuradhaKaruppiah
Copy link
Contributor

/ok to test e2ce872

Signed-off-by: Anuradha Karuppiah <[email protected]>
@AnuradhaKaruppiah
Copy link
Contributor

/ok to test cdc2ded

Signed-off-by: Anuradha Karuppiah <[email protected]>
@AnuradhaKaruppiah
Copy link
Contributor

/ok to test 02d3094

@AnuradhaKaruppiah
Copy link
Contributor

Thanks for you contribution @ayulockin

@AnuradhaKaruppiah
Copy link
Contributor

/merge

@rapids-bot rapids-bot bot merged commit f6c6282 into NVIDIA:develop May 1, 2025
10 checks passed
@AnuradhaKaruppiah AnuradhaKaruppiah requested a review from Copilot May 1, 2025 22:02
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 pull request adds fine-grained tracing support using Weights & Biases Weave, allowing AIQ Toolkit to trace intermediate steps and underlying frameworks. Key changes include:

  • Integration of Weave tracing into the asynchronous OpenTelemetry listener with new methods to create and finish Weave calls.
  • Addition of the aiqtoolkit-weave subpackage with a new telemetry exporter and registration for Weave.
  • Updates to configuration files, documentation, and dependencies to support Weave integration.

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/aiq/observability/async_otel_listener.py Added Weave client initialization, call creation/finishing logic, and a context manager for parent calls.
pyproject.toml Introduced the weave dependency and workspace configuration.
packages/aiqtoolkit_weave/src/aiq/plugins/weave/weave_sdk.py Implemented the Weave telemetry exporter with a NoOpSpanExporter fallback.
packages/aiqtoolkit_weave/src/aiq/plugins/weave/register.py Registered the Weave plugin module.
packages/aiqtoolkit_weave/src/aiq/meta/pypi.md Updated documentation with license header and project metadata.
packages/aiqtoolkit_weave/pyproject.toml Configured the subpackage for Weave integration.
examples/simple_calculator/configs/config-weave.yml Provided sample configuration for enabling Weave tracing.
docs/source/guides/index.md Added a new reference for the fine-grained tracing guide.
docs/source/guides/fine-grained-tracing-with-weave.md Created a step-by-step guide for setting up Weave tracing.
Files not reviewed (1)
  • docs/source/_static/weave_tracing.png: Language not supported
Comments suppressed due to low confidence (1)

src/aiq/observability/async_otel_listener.py:100

  • [nitpick] The attribute name 'gc' is ambiguous; consider renaming it to 'weave_client' for improved clarity and maintainability.
self.gc = None

yczhang-nv pushed a commit to yczhang-nv/NeMo-Agent-Toolkit that referenced this pull request May 8, 2025
Closes

This PR adds support tracing of AIQ intemediate steps and the underlying framework (Langchain, CrewAI, etc.) using Weights and Biases [Weave](https://weave-docs.wandb.ai) platform for better interactivity and off-the-shelf LLMOps life-cycle.

As a user all you need to do is update the `config.yaml` with the following:

```
general:
  use_uvloop: true
  telemetry:
    tracing:
      weave:
        _type: weave
        entity: <your-wandb-entity>
        project: my-awesome-genai-app
```

An example trace timeline logged to Weave:

<img width="1728" alt="image" src="https://github.com/user-attachments/assets/382d4926-b115-4514-a453-c58cf550a457" />

View more traces in this project: https://wandb.ai/ayut/simple_calculator/weave/traces?view=traces_default

cc: @mdemoret-nv

This PR was opened in favor of NVIDIA#135

## 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:
  - Ayush Thakur (https://github.com/ayulockin)
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

Approvers:
  - Dhruv Nandakumar (https://github.com/dnandakumar-nv)

URL: NVIDIA#170
Signed-off-by: Yuchen Zhang <[email protected]>
yczhang-nv pushed a commit to yczhang-nv/NeMo-Agent-Toolkit that referenced this pull request May 9, 2025
Closes

This PR adds support tracing of AIQ intemediate steps and the underlying framework (Langchain, CrewAI, etc.) using Weights and Biases [Weave](https://weave-docs.wandb.ai) platform for better interactivity and off-the-shelf LLMOps life-cycle.

As a user all you need to do is update the `config.yaml` with the following:

```
general:
  use_uvloop: true
  telemetry:
    tracing:
      weave:
        _type: weave
        entity: <your-wandb-entity>
        project: my-awesome-genai-app
```

An example trace timeline logged to Weave:

<img width="1728" alt="image" src="https://github.com/user-attachments/assets/382d4926-b115-4514-a453-c58cf550a457" />

View more traces in this project: https://wandb.ai/ayut/simple_calculator/weave/traces?view=traces_default

cc: @mdemoret-nv

This PR was opened in favor of NVIDIA#135

## 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:
  - Ayush Thakur (https://github.com/ayulockin)
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

Approvers:
  - Dhruv Nandakumar (https://github.com/dnandakumar-nv)

URL: NVIDIA#170
Signed-off-by: Yuchen Zhang <[email protected]>
ericevans-nv pushed a commit to ericevans-nv/agent-iq that referenced this pull request Jun 3, 2025
Closes

This PR adds support tracing of AIQ intemediate steps and the underlying framework (Langchain, CrewAI, etc.) using Weights and Biases [Weave](https://weave-docs.wandb.ai) platform for better interactivity and off-the-shelf LLMOps life-cycle.

As a user all you need to do is update the `config.yaml` with the following:

```
general:
  use_uvloop: true
  telemetry:
    tracing:
      weave:
        _type: weave
        entity: <your-wandb-entity>
        project: my-awesome-genai-app
```

An example trace timeline logged to Weave:

<img width="1728" alt="image" src="https://github.com/user-attachments/assets/382d4926-b115-4514-a453-c58cf550a457" />

View more traces in this project: https://wandb.ai/ayut/simple_calculator/weave/traces?view=traces_default

cc: @mdemoret-nv

This PR was opened in favor of NVIDIA#135

## 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:
  - Ayush Thakur (https://github.com/ayulockin)
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

Approvers:
  - Dhruv Nandakumar (https://github.com/dnandakumar-nv)

URL: NVIDIA#170
Signed-off-by: Eric Evans <[email protected]>
ericevans-nv pushed a commit to ericevans-nv/agent-iq that referenced this pull request Jun 3, 2025
Closes

This PR adds support tracing of AIQ intemediate steps and the underlying framework (Langchain, CrewAI, etc.) using Weights and Biases [Weave](https://weave-docs.wandb.ai) platform for better interactivity and off-the-shelf LLMOps life-cycle.

As a user all you need to do is update the `config.yaml` with the following:

```
general:
  use_uvloop: true
  telemetry:
    tracing:
      weave:
        _type: weave
        entity: <your-wandb-entity>
        project: my-awesome-genai-app
```

An example trace timeline logged to Weave:

<img width="1728" alt="image" src="https://github.com/user-attachments/assets/382d4926-b115-4514-a453-c58cf550a457" />

View more traces in this project: https://wandb.ai/ayut/simple_calculator/weave/traces?view=traces_default

cc: @mdemoret-nv

This PR was opened in favor of NVIDIA#135

## 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:
  - Ayush Thakur (https://github.com/ayulockin)
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

Approvers:
  - Dhruv Nandakumar (https://github.com/dnandakumar-nv)

URL: NVIDIA#170
Signed-off-by: Eric Evans <[email protected]>
AnuradhaKaruppiah pushed a commit to AnuradhaKaruppiah/oss-agentiq that referenced this pull request Aug 4, 2025
Closes

This PR adds support tracing of AIQ intemediate steps and the underlying framework (Langchain, CrewAI, etc.) using Weights and Biases [Weave](https://weave-docs.wandb.ai) platform for better interactivity and off-the-shelf LLMOps life-cycle.

As a user all you need to do is update the `config.yaml` with the following:

```
general:
  use_uvloop: true
  telemetry:
    tracing:
      weave:
        _type: weave
        entity: <your-wandb-entity>
        project: my-awesome-genai-app
```

An example trace timeline logged to Weave:

<img width="1728" alt="image" src="https://github.com/user-attachments/assets/382d4926-b115-4514-a453-c58cf550a457" />


View more traces in this project: https://wandb.ai/ayut/simple_calculator/weave/traces?view=traces_default

cc: @mdemoret-nv

This PR was opened in favor of NVIDIA#135 

## 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:
  - Ayush Thakur (https://github.com/ayulockin)
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

Approvers:
  - Dhruv Nandakumar (https://github.com/dnandakumar-nv)

URL: NVIDIA#170
scheckerNV pushed a commit to scheckerNV/aiq-factory-reset that referenced this pull request Aug 22, 2025
Closes

This PR adds support tracing of AIQ intemediate steps and the underlying framework (Langchain, CrewAI, etc.) using Weights and Biases [Weave](https://weave-docs.wandb.ai) platform for better interactivity and off-the-shelf LLMOps life-cycle.

As a user all you need to do is update the `config.yaml` with the following:

```
general:
  use_uvloop: true
  telemetry:
    tracing:
      weave:
        _type: weave
        entity: <your-wandb-entity>
        project: my-awesome-genai-app
```

An example trace timeline logged to Weave:

<img width="1728" alt="image" src="https://github.com/user-attachments/assets/382d4926-b115-4514-a453-c58cf550a457" />


View more traces in this project: https://wandb.ai/ayut/simple_calculator/weave/traces?view=traces_default

cc: @mdemoret-nv

This PR was opened in favor of NVIDIA#135 

## 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:
  - Ayush Thakur (https://github.com/ayulockin)
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

Approvers:
  - Dhruv Nandakumar (https://github.com/dnandakumar-nv)

URL: NVIDIA#170
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.

3 participants