milvus-io / bootcamp

Dealing with all unstructured data, such as reverse image search, audio search, molecular search, video analysis, question and answer systems, NLP, etc.
https://milvus.io
Apache License 2.0
1.83k stars 561 forks source link

[BUG]: ModuleNotFoundError: No module named 'milvus_utilities' #1292

Closed diractions closed 5 months ago

diractions commented 5 months ago

Is there an existing issue for this?

Current Behavior

I'm trying to following the tutorial notebook: bootcamp/RAG/readthedocs_zilliz_langchain.ipynb

I've successfully installed all necessary packages from step 1 in colab: %pip install pymilvus langchain torch transformers sentence-transformers ! pip install python-dotenv unstructured openai

A ModuleNotFoundError is now thrown after executing the next step:

Import common libraries.

import sys, os, time, pprint import numpy as np

Import custom functions for splitting and search.

sys.path.append("..") # Adds higher directory to python modules path. import milvus_utilities as _utils

ModuleNotFoundError Traceback (most recent call last) in <cell line: 7>() 5 # Import custom functions for splitting and search. 6 sys.path.append("..") # Adds higher directory to python modules path. ----> 7 import milvus_utilities as _utils

ModuleNotFoundError: No module named 'milvus_utilities'

Expected Behavior

When I run this second step, no error is thrown.

Steps To Reproduce

I've reproduced this error both in my local Jupyter notebook running in a local Docker container as well on Colab. Both throw the same error.

Software version

Latest pymilvus
For the rest, the used environments are quite standard.

Anything else?

I've searched online to find information about the milvus_utilities module. I could not find anything on this, so I assume this is deprecated?

christy commented 5 months ago

Thanks @diractions for noticing. I actually changed the notebook meantime. I no longer need milvus_utilties in this particular notebook.

Instead of using MilvusClient json no-schema, now the notebook uses a typed schema. This is because our built-in hybrid search (sparse, dense, reranker) requires a typed schema instead of MilvusClient json no-schema.