llama-stack
llama-stack copied to clipboard
Redis persistence store not working
System Info
Collecting environment information... PyTorch version: 2.2.2 Is debug build: False CUDA used to build PyTorch: None ROCM used to build PyTorch: N/A
OS: macOS 13.6.6 (x86_64) GCC version: Could not collect Clang version: 14.0.3 (clang-1403.0.22.14.1) CMake version: Could not collect Libc version: N/A
Python version: 3.10.14 (main, May 6 2024, 14:47:20) [Clang 14.0.6 ] (64-bit runtime) Python platform: macOS-10.16-x86_64-i386-64bit Is CUDA available: False CUDA runtime version: No CUDA CUDA_MODULE_LOADING set to: N/A GPU models and configuration: No CUDA Nvidia driver version: No CUDA cuDNN version: No CUDA HIP runtime version: N/A MIOpen runtime version: N/A Is XNNPACK available: True
CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Versions of relevant libraries: [pip3] numpy==1.26.4 [pip3] onnxruntime==1.19.2 [pip3] torch==2.2.2 [conda] numpy 1.26.4 pypi_0 pypi [conda] torch 2.2.2 pypi_0 pypi
Information
- [ ] The official example scripts
- [X] My own modified scripts
🐛 Describe the bug
When you execute a turn after creating agent_id and session_id, the error comes as zrangebylex method throws an error with the error being that 1 argument is missing. This is happening because we are not using sorted_sets, we are just setting the values using keys. Because of that we do not have a name for the sorted set, so its causing an error.
Error logs
INFO: ::1:58967 - "POST /alpha/agents/turn/create HTTP/1.1" 200 OK
Traceback (most recent call last):
File "/Users/sarthakdeshpande/Desktop/untitled folder 2/llama-stack/llama_stack/distribution/server/server.py", line 158, in sse_generator
async for item in event_gen:
File "/Users/sarthakdeshpande/Desktop/untitled folder 2/llama-stack/llama_stack/providers/inline/agents/meta_reference/agents.py", line 138, in _create_agent_turn_streaming
async for event in agent.create_and_execute_turn(request):
File "/Users/sarthakdeshpande/Desktop/untitled folder 2/llama-stack/llama_stack/providers/inline/agents/meta_reference/agent_instance.py", line 157, in create_and_execute_turn
turns = await self.storage.get_session_turns(request.session_id)
File "/Users/sarthakdeshpande/Desktop/untitled folder 2/llama-stack/llama_stack/providers/inline/agents/meta_reference/persistence.py", line 73, in get_session_turns
values = await self.kvstore.range(
File "/Users/sarthakdeshpande/Desktop/untitled folder 2/llama-stack/llama_stack/providers/utils/kvstore/redis/redis.py", line 52, in range
return await self.redis.zrangebylex(start_key, end_key)
TypeError: SortedSetCommands.zrangebylex() missing 1 required positional argument: 'max'
Expected behavior
No error, just turn should be created
PR #521
Yeah I'm running into this error as well
closing this issue since the PR is merged.