-
Notifications
You must be signed in to change notification settings - Fork 271
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Required prerequisites
- I have read the documentation https://docs.oasis.camel-ai.org/.
- I have searched the Issue Tracker and Discussions that this hasn't already been reported. (+1 or comment there if it has.)
- Consider asking first in a Discussion.
What version of camel-oasis are you using?
0.2.5
System information
installed via uv
3.11.14 (main, Dec 9 2025, 19:02:23) [Clang 21.1.4 ] linux
Problem description
in oasis/social_platform/recsys.py
in the function rec_sys_personalized_with_trace()
'post_id' is not a valid key for trace -> raise an error
Reproducible example code
slightly modified version of
examples/experiment/twitter_simulation_1M_agents/twitter_simulation_1m.py
using twitter recsys
when calling
await platform.update_rec_table()
Traceback
Traceback (most recent call last):
File "/home/noce/.local/share/uv/python/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/home/noce/.local/share/uv/python/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/noce/.local/share/uv/python/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/noce/Documents/TG/backend/src/services/simulation_service.py", line 234, in run
await self.platform.update_rec_table()
File "/home/noce/Documents/TG/backend/.venv/lib/python3.11/site-packages/oasis/social_platform/platform.py", line 340, in update_rec_table
new_rec_matrix = rec_sys_personalized_with_trace(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/noce/Documents/TG/backend/.venv/lib/python3.11/site-packages/oasis/social_platform/recsys.py", line 784, in rec_sys_personalized_with_trace
swap_free_ids = [
^
File "/home/noce/Documents/TG/backend/.venv/lib/python3.11/site-packages/oasis/social_platform/recsys.py", line 786, in <listcomp>
if post_id not in rec_post_ids and post_id not in [
^
File "/home/noce/Documents/TG/backend/.venv/lib/python3.11/site-packages/oasis/social_platform/recsys.py", line 787, in <listcomp>
trace['post_id']
~~~~~^^^^^^^^^^^
KeyError: 'post_id'Expected behavior
Not raising an error
Additional context
trace only have these keys
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working