-
Notifications
You must be signed in to change notification settings - Fork 421
Check if request is present before setting attributes #209
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
Merged
rapids-bot
merged 1 commit into
NVIDIA:develop
from
AnuradhaKaruppiah:fix-set-attributes
May 5, 2025
Merged
Check if request is present before setting attributes #209
rapids-bot
merged 1 commit into
NVIDIA:develop
from
AnuradhaKaruppiah:fix-set-attributes
May 5, 2025
+4
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Anuradha Karuppiah <[email protected]>
ericevans-nv
approved these changes
May 5, 2025
Contributor
|
/merge |
yczhang-nv
pushed a commit
to yczhang-nv/NeMo-Agent-Toolkit
that referenced
this pull request
May 8, 2025
Steps to repro:
Install latest AiqToolKit from source and run the simple-calculator example:
```
aiq run --config_file examples/simple_cal
culator/configs/config.yml --input "What is the product of 3 and 7, and is it greater than the curre
nt hour?"
```
Following traceback is seen:
```
2025-05-05 11:18:30,130 - aiq.cli.commands.start - ERROR - Failed to initialize workflow
Traceback (most recent call last):
File "/home/devcontainers/dev/forks/agentiq/src/aiq/cli/commands/start.py", line 229, in invoke_subcommand
return asyncio.run(run_plugin())
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/.venv/lib/python3.12/site-packages/nest_asyncio.py", line 30, in run
return loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/.venv/lib/python3.12/site-packages/nest_asyncio.py", line 98, in run_until_complete
return f.result()
^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/futures.py", line 202, in result
raise self._exception.with_traceback(self._exception_tb)
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 316, in __step_run_and_handle_result
result = coro.throw(exc)
^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/cli/commands/start.py", line 227, in run_plugin
await front_end_plugin.run()
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 74, in run
await self.run_workflow(session_manager)
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 94, in run_workflow
runner_outputs = await asyncio.gather(*[run_single_query(query) for query in input_list])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 385, in __wakeup
future.result()
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 314, in __step_run_and_handle_result
result = coro.send(None)
^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 84, in run_single_query
async with session_manager.session(user_input_callback=prompt_for_input_cli) as session:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/contextlib.py", line 210, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/runtime/session.py", line 100, in session
self.set_request_attributes(request)
File "/home/devcontainers/dev/forks/agentiq/src/aiq/runtime/session.py", line 127, in set_request_attributes
self._context.metadata._request.method = request.method
^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'method'
Error: 'NoneType' object has no attribute 'method'
```
This PR adds a sanity check to prevent request access unless it is present.
## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AIQToolkit/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)
URL: NVIDIA#209
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
Steps to repro:
Install latest AiqToolKit from source and run the simple-calculator example:
```
aiq run --config_file examples/simple_cal
culator/configs/config.yml --input "What is the product of 3 and 7, and is it greater than the curre
nt hour?"
```
Following traceback is seen:
```
2025-05-05 11:18:30,130 - aiq.cli.commands.start - ERROR - Failed to initialize workflow
Traceback (most recent call last):
File "/home/devcontainers/dev/forks/agentiq/src/aiq/cli/commands/start.py", line 229, in invoke_subcommand
return asyncio.run(run_plugin())
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/.venv/lib/python3.12/site-packages/nest_asyncio.py", line 30, in run
return loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/.venv/lib/python3.12/site-packages/nest_asyncio.py", line 98, in run_until_complete
return f.result()
^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/futures.py", line 202, in result
raise self._exception.with_traceback(self._exception_tb)
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 316, in __step_run_and_handle_result
result = coro.throw(exc)
^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/cli/commands/start.py", line 227, in run_plugin
await front_end_plugin.run()
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 74, in run
await self.run_workflow(session_manager)
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 94, in run_workflow
runner_outputs = await asyncio.gather(*[run_single_query(query) for query in input_list])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 385, in __wakeup
future.result()
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 314, in __step_run_and_handle_result
result = coro.send(None)
^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 84, in run_single_query
async with session_manager.session(user_input_callback=prompt_for_input_cli) as session:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/contextlib.py", line 210, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/runtime/session.py", line 100, in session
self.set_request_attributes(request)
File "/home/devcontainers/dev/forks/agentiq/src/aiq/runtime/session.py", line 127, in set_request_attributes
self._context.metadata._request.method = request.method
^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'method'
Error: 'NoneType' object has no attribute 'method'
```
This PR adds a sanity check to prevent request access unless it is present.
## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AIQToolkit/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)
URL: NVIDIA#209
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
Steps to repro:
Install latest AiqToolKit from source and run the simple-calculator example:
```
aiq run --config_file examples/simple_cal
culator/configs/config.yml --input "What is the product of 3 and 7, and is it greater than the curre
nt hour?"
```
Following traceback is seen:
```
2025-05-05 11:18:30,130 - aiq.cli.commands.start - ERROR - Failed to initialize workflow
Traceback (most recent call last):
File "/home/devcontainers/dev/forks/agentiq/src/aiq/cli/commands/start.py", line 229, in invoke_subcommand
return asyncio.run(run_plugin())
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/.venv/lib/python3.12/site-packages/nest_asyncio.py", line 30, in run
return loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/.venv/lib/python3.12/site-packages/nest_asyncio.py", line 98, in run_until_complete
return f.result()
^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/futures.py", line 202, in result
raise self._exception.with_traceback(self._exception_tb)
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 316, in __step_run_and_handle_result
result = coro.throw(exc)
^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/cli/commands/start.py", line 227, in run_plugin
await front_end_plugin.run()
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 74, in run
await self.run_workflow(session_manager)
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 94, in run_workflow
runner_outputs = await asyncio.gather(*[run_single_query(query) for query in input_list])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 385, in __wakeup
future.result()
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 314, in __step_run_and_handle_result
result = coro.send(None)
^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 84, in run_single_query
async with session_manager.session(user_input_callback=prompt_for_input_cli) as session:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/contextlib.py", line 210, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/runtime/session.py", line 100, in session
self.set_request_attributes(request)
File "/home/devcontainers/dev/forks/agentiq/src/aiq/runtime/session.py", line 127, in set_request_attributes
self._context.metadata._request.method = request.method
^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'method'
Error: 'NoneType' object has no attribute 'method'
```
This PR adds a sanity check to prevent request access unless it is present.
## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AIQToolkit/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)
URL: NVIDIA#209
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
Steps to repro:
Install latest AiqToolKit from source and run the simple-calculator example:
```
aiq run --config_file examples/simple_cal
culator/configs/config.yml --input "What is the product of 3 and 7, and is it greater than the curre
nt hour?"
```
Following traceback is seen:
```
2025-05-05 11:18:30,130 - aiq.cli.commands.start - ERROR - Failed to initialize workflow
Traceback (most recent call last):
File "/home/devcontainers/dev/forks/agentiq/src/aiq/cli/commands/start.py", line 229, in invoke_subcommand
return asyncio.run(run_plugin())
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/.venv/lib/python3.12/site-packages/nest_asyncio.py", line 30, in run
return loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/.venv/lib/python3.12/site-packages/nest_asyncio.py", line 98, in run_until_complete
return f.result()
^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/futures.py", line 202, in result
raise self._exception.with_traceback(self._exception_tb)
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 316, in __step_run_and_handle_result
result = coro.throw(exc)
^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/cli/commands/start.py", line 227, in run_plugin
await front_end_plugin.run()
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 74, in run
await self.run_workflow(session_manager)
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 94, in run_workflow
runner_outputs = await asyncio.gather(*[run_single_query(query) for query in input_list])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 385, in __wakeup
future.result()
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 314, in __step_run_and_handle_result
result = coro.send(None)
^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 84, in run_single_query
async with session_manager.session(user_input_callback=prompt_for_input_cli) as session:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/contextlib.py", line 210, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/runtime/session.py", line 100, in session
self.set_request_attributes(request)
File "/home/devcontainers/dev/forks/agentiq/src/aiq/runtime/session.py", line 127, in set_request_attributes
self._context.metadata._request.method = request.method
^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'method'
Error: 'NoneType' object has no attribute 'method'
```
This PR adds a sanity check to prevent request access unless it is present.
## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AIQToolkit/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)
URL: NVIDIA#209
Signed-off-by: Eric Evans <[email protected]>
AnuradhaKaruppiah
added a commit
to AnuradhaKaruppiah/oss-agentiq
that referenced
this pull request
Aug 4, 2025
Steps to repro:
Install latest AiqToolKit from source and run the simple-calculator example:
```
aiq run --config_file examples/simple_cal
culator/configs/config.yml --input "What is the product of 3 and 7, and is it greater than the curre
nt hour?"
```
Following traceback is seen:
```
2025-05-05 11:18:30,130 - aiq.cli.commands.start - ERROR - Failed to initialize workflow
Traceback (most recent call last):
File "/home/devcontainers/dev/forks/agentiq/src/aiq/cli/commands/start.py", line 229, in invoke_subcommand
return asyncio.run(run_plugin())
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/.venv/lib/python3.12/site-packages/nest_asyncio.py", line 30, in run
return loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/.venv/lib/python3.12/site-packages/nest_asyncio.py", line 98, in run_until_complete
return f.result()
^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/futures.py", line 202, in result
raise self._exception.with_traceback(self._exception_tb)
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 316, in __step_run_and_handle_result
result = coro.throw(exc)
^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/cli/commands/start.py", line 227, in run_plugin
await front_end_plugin.run()
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 74, in run
await self.run_workflow(session_manager)
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 94, in run_workflow
runner_outputs = await asyncio.gather(*[run_single_query(query) for query in input_list])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 385, in __wakeup
future.result()
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 314, in __step_run_and_handle_result
result = coro.send(None)
^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 84, in run_single_query
async with session_manager.session(user_input_callback=prompt_for_input_cli) as session:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/contextlib.py", line 210, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/runtime/session.py", line 100, in session
self.set_request_attributes(request)
File "/home/devcontainers/dev/forks/agentiq/src/aiq/runtime/session.py", line 127, in set_request_attributes
self._context.metadata._request.method = request.method
^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'method'
Error: 'NoneType' object has no attribute 'method'
```
This PR adds a sanity check to prevent request access unless it is present.
## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AIQToolkit/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)
URL: NVIDIA#209
scheckerNV
pushed a commit
to scheckerNV/aiq-factory-reset
that referenced
this pull request
Aug 22, 2025
Steps to repro:
Install latest AiqToolKit from source and run the simple-calculator example:
```
aiq run --config_file examples/simple_cal
culator/configs/config.yml --input "What is the product of 3 and 7, and is it greater than the curre
nt hour?"
```
Following traceback is seen:
```
2025-05-05 11:18:30,130 - aiq.cli.commands.start - ERROR - Failed to initialize workflow
Traceback (most recent call last):
File "/home/devcontainers/dev/forks/agentiq/src/aiq/cli/commands/start.py", line 229, in invoke_subcommand
return asyncio.run(run_plugin())
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/.venv/lib/python3.12/site-packages/nest_asyncio.py", line 30, in run
return loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/.venv/lib/python3.12/site-packages/nest_asyncio.py", line 98, in run_until_complete
return f.result()
^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/futures.py", line 202, in result
raise self._exception.with_traceback(self._exception_tb)
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 316, in __step_run_and_handle_result
result = coro.throw(exc)
^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/cli/commands/start.py", line 227, in run_plugin
await front_end_plugin.run()
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 74, in run
await self.run_workflow(session_manager)
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 94, in run_workflow
runner_outputs = await asyncio.gather(*[run_single_query(query) for query in input_list])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 385, in __wakeup
future.result()
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 314, in __step_run_and_handle_result
result = coro.send(None)
^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/front_ends/console/console_front_end_plugin.py", line 84, in run_single_query
async with session_manager.session(user_input_callback=prompt_for_input_cli) as session:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/contextlib.py", line 210, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/home/devcontainers/dev/forks/agentiq/src/aiq/runtime/session.py", line 100, in session
self.set_request_attributes(request)
File "/home/devcontainers/dev/forks/agentiq/src/aiq/runtime/session.py", line 127, in set_request_attributes
self._context.metadata._request.method = request.method
^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'method'
Error: 'NoneType' object has no attribute 'method'
```
This PR adds a sanity check to prevent request access unless it is present.
## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AIQToolkit/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)
URL: NVIDIA#209
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Steps to repro:
Install latest AiqToolKit from source and run the simple-calculator example:
Following traceback is seen:
This PR adds a sanity check to prevent request access unless it is present.
By Submitting this PR I confirm: