HowieHwong / MetaTool

[ICLR 2024] MetaTool Benchmark for Large Language Models: Deciding Whether to Use Tools and Which to Use
MIT License
69 stars 8 forks source link

pymilvus.exceptions.SchemaNotReadyException: <SchemaNotReadyException: (code=1, message=Collection 'tool_embedding' not exist, or you can pass in schema to create one.)> #5

Closed sian-chen closed 9 months ago

sian-chen commented 9 months ago

Dear Authors,

Thank you so much for the excellent work. I'm excited to see the benchmark and want to evaluate our model on it.

However, when trying to construct the prompts. I encounter the following error:

Traceback (most recent call last):
  File "/opt/conda/envs/metatool/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/conda/envs/metatool/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/sianchen/MetaTool/src/prompt/prompt_construction.py", line 290, in <module>
    run_task(args.task)
  File "/home/sianchen/MetaTool/src/prompt/prompt_construction.py", line 263, in run_task
    prompt_construction.get_multi_tool_prompt('dataset/data/multi_tool_query_golden.json')
  File "/home/sianchen/MetaTool/src/prompt/prompt_construction.py", line 225, in get_multi_tool_prompt
    collection = Collection(name='tool_embedding', using='default')
  File "/opt/conda/envs/metatool/lib/python3.9/site-packages/pymilvus/orm/collection.py", line 137, in __init__
    raise SchemaNotReadyException(

I've installed and run milvus locally following the guide. But if I understand correctly, it would just create an empty server so there is no tool_embedding schema inside. Could you please add more detail in the README regarding how to set up the server, so we can run the evaluation from scratch smoothly?

Thanks.

HowieHwong commented 9 months ago

Hi Sian,

You should first run src/embedding/milvus_database.py to construct a database. Then this error could be addressed.

I have updated the README.md accordingly.

sian-chen commented 9 months ago

Thanks for your prompt reply. The problem is solved!