Checked other resources
Describe your current environment
No response
Describe the bug
Description
A TypeError occurs when using the RR scheduler with the demo agent and use_context_manager: true in config.yaml. When a single LLMSyscall object is passed to _execute_batch_syscalls instead of a list, the following error appears:
TypeError: 'LLMSyscall' object is not iterable
Prerequisites
config.yaml is configured with:
use_context_manager: true
RR scheduler is being used.
-
The demo agent is triggered to generate syscalls.
-
Version: latest main branch (2025-07-09).
-
Reproduction Steps
-
Set use_context_manager: true in config.yaml.
-
Use the RR scheduler.
-
Trigger the demo agent to run.
-
Observe the exception in the logs.
Expected Behavior
_execute_batch_syscalls should always receive a list of syscalls. If a single syscall is passed, it should either be wrapped in a list or the function should raise an informative error.
Actual Behavior
A TypeError is raised because a single LLMSyscall object is not iterable.
Logs / Stack Trace
Exception in thread process_llm_requests:
Traceback (most recent call last):
File "/home/jianlong/miniconda3/envs/aios/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/home/jianlong/miniconda3/envs/aios/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/jianlong/AIOS/aios/scheduler/rr_scheduler.py", line 181, in process_llm_requests
self._execute_batch_syscalls(llm_syscall, self.llm.execute_llm_syscalls, "LLM")
File "/home/jianlong/AIOS/aios/scheduler/rr_scheduler.py", line 134, in _execute_batch_syscalls
for syscall in batch:
TypeError: 'LLMSyscall' object is not iterable
Checked other resources
Describe your current environment
No response
Describe the bug
Description
A TypeError occurs when using the RR scheduler with the demo agent and use_context_manager: true in config.yaml. When a single LLMSyscall object is passed to _execute_batch_syscalls instead of a list, the following error appears:
TypeError: 'LLMSyscall' object is not iterablePrerequisites
config.yaml is configured with:
use_context_manager: trueRR scheduler is being used.
The demo agent is triggered to generate syscalls.
Version: latest main branch (2025-07-09).
Reproduction Steps
Set use_context_manager: true in config.yaml.
Use the RR scheduler.
Trigger the demo agent to run.
Observe the exception in the logs.
Expected Behavior
_execute_batch_syscalls should always receive a list of syscalls. If a single syscall is passed, it should either be wrapped in a list or the function should raise an informative error.
Actual Behavior
A TypeError is raised because a single LLMSyscall object is not iterable.
Logs / Stack Trace