-
Notifications
You must be signed in to change notification settings - Fork 416
Add support for fine-grained tracing using W&B Weave #170
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
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]>
Signed-off-by: ayulockin <[email protected]>
|
hey @mdemoret-nv can you give it a review? I have added documentation as well. :) |
Signed-off-by: ayulockin <[email protected]>
Signed-off-by: ayulockin <[email protected]>
|
/ok to test 9312d0a |
dnandakumar-nv
left a comment
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.
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
Signed-off-by: Anuradha Karuppiah <[email protected]>
|
/ok to test 24ac3e2 |
|
/ok to test 24ac3e2 |
@AnuradhaKaruppiah, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test e2ce872 |
Signed-off-by: Anuradha Karuppiah <[email protected]>
|
/ok to test cdc2ded |
Signed-off-by: Anuradha Karuppiah <[email protected]>
|
/ok to test 02d3094 |
|
Thanks for you contribution @ayulockin |
|
/merge |
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 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
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]>
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]>
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]>
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]>
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
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
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.yamlwith the following:An example trace timeline logged to Weave:
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: