Skip to content

Conversation

@Li-Qingyun
Copy link

Description

Fix evaluation

Two Error raised when evaluating LECOMO on mem0 (embedding mode).

Seems like breaking from interface changing.

❯ python run_experiments.py --technique_type mem0 --method search --output_folder results/ --top_k 30
Traceback (most recent call last):
  File "/Users/lqy/Workspace/mem0_eval/run_experiments.py", line 75, in <module>
    main()
  File "/Users/lqy/Workspace/mem0_eval/run_experiments.py", line 49, in main
    memory_searcher.process_data_file("dataset/locomo10.json")
  File "/Users/lqy/Workspace/mem0_eval/src/memzero/search.py", line 187, in process_data_file
    result = self.process_question(question_item, speaker_a_user_id, speaker_b_user_id)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lqy/Workspace/mem0_eval/src/memzero/search.py", line 145, in process_question
    ) = self.answer_question(speaker_a_user_id, speaker_b_user_id, question, answer, category)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lqy/Workspace/mem0_eval/src/memzero/search.py", line 91, in answer_question
    speaker_1_memories, speaker_1_graph_memories, speaker_1_memory_time = self.search_memory(
                                                                          ^^^^^^^^^^^^^^^^^^^
  File "/Users/lqy/Workspace/mem0_eval/src/memzero/search.py", line 61, in search_memory
    raise e
  File "/Users/lqy/Workspace/mem0_eval/src/memzero/search.py", line 53, in search_memory
    memories = self.mem0_client.search(
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/lib/python3.12/site-packages/mem0/client/utils.py", line 86, in wrapper
    raise exception
mem0.exceptions.ValidationError: {"error":"Filters are required and cannot be empty. Please refer to https://docs.mem0.ai/api-reference/memory/search-memories"}
❯ python run_experiments.py --technique_type mem0 --method search --output_folder results/ --top_k 30
Running experiments with technique: mem0, chunk size: 1000
Processing conversations:   0%|                                                        | 0/10 [00:01<?, ?it/s]
Traceback (most recent call last):                                                                            
  File "/Users/lqy/Workspace/mem0_eval/run_experiments.py", line 75, in <module>
    main()
  File "/Users/lqy/Workspace/mem0_eval/run_experiments.py", line 49, in main
    memory_searcher.process_data_file("dataset/locomo10.json")
  File "/Users/lqy/Workspace/mem0_eval/src/memzero/search.py", line 188, in process_data_file
    result = self.process_question(question_item, speaker_a_user_id, speaker_b_user_id)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lqy/Workspace/mem0_eval/src/memzero/search.py", line 146, in process_question
    ) = self.answer_question(speaker_a_user_id, speaker_b_user_id, question, answer, category)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lqy/Workspace/mem0_eval/src/memzero/search.py", line 92, in answer_question
    speaker_1_memories, speaker_1_graph_memories, speaker_1_memory_time = self.search_memory(
                                                                          ^^^^^^^^^^^^^^^^^^^
  File "/Users/lqy/Workspace/mem0_eval/src/memzero/search.py", line 69, in search_memory
    "memory": memory["memory"],
              ~~~~~~^^^^^^^^^^
TypeError: string indices must be integers, not 'str'

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Please delete options that are not relevant.

  • Test Script (please provide)
python run_experiments.py --technique_type mem0 --method search --output_folder results/ --top_k 30
❯ python run_experiments.py --technique_type mem0 --method search --output_folder results/ --top_k 30
Running experiments with technique: mem0, chunk size: 1000
Processing conversations:  30%|█████████████▌                               | 3/10 [27:51<1:04:51, 555.92s/it]
Processing questions for conversation 3:  52%|███████████████▍              | 134/260 [07:16<07:23,  3.52s/it]

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Made sure Checks passed

@CLAassistant
Copy link

CLAassistant commented Oct 27, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants