Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: SPARSE_FLOAT_VECTOR FieldSchema cause error.(data type not supported) #39392

Open
1 task done
jaylee4274 opened this issue Jan 17, 2025 · 2 comments
Open
1 task done
Assignees
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@jaylee4274
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version: pymilvus 2.4.0, milvus 2.2.16
- Deployment mode(standalone or cluster): standalone
- MQ type(rocksmq, pulsar or kafka):    
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS): Windows
- CPU/Memory: 
- GPU: 4090(24gb)
- Others:

Current Behavior

Everytime I define Collection. FieldSchema(name="sparse_vector", dtype=DataType.SPARSE_FLOAT_VECTOR) causes RPC error.

Expected Behavior

Collection should be made by do this.

Steps To Reproduce

fields = [
    # Use auto generated id as primary key
    FieldSchema(
        name="pk", dtype=DataType.INT64, is_primary=True, auto_id=True, max_length=100
    ),
    FieldSchema(name="text", dtype=DataType.VARCHAR, max_length=8192),
    FieldSchema(name="sparse_vector", dtype=DataType.SPARSE_FLOAT_VECTOR),
    #FieldSchema(name="dense_vector", dtype=DataType.FLOAT_VECTOR, dim=1024),
]
schema = CollectionSchema(fields, "")
col = Collection("sparse_dense_demo", schema)

-> MilvusException: <MilvusException: (code=0, message=104 data type not supported)>

Milvus Log


MilvusException Traceback (most recent call last)
[... skipping hidden 1 frame]

Cell In[8], line 11
10 schema = CollectionSchema(fields, "")
---> 11 col = Collection("sparse_dense_demo", schema)

File c:\Users\SKsiltron\Desktop\works\LLM\lib\site-packages\pymilvus\orm\collection.py:149, in Collection.init(self, name, schema, using, **kwargs)
145 consistency_level = get_consistency_level(
146 kwargs.get("consistency_level", DEFAULT_CONSISTENCY_LEVEL)
147 )
--> 149 conn.create_collection(self._name, schema, **kwargs)
150 self._schema = schema

File c:\Users\SKsiltron\Desktop\works\LLM\lib\site-packages\pymilvus\decorators.py:147, in error_handler..wrapper..handler(*args, **kwargs)
146 LOGGER.error(f"RPC error: [{inner_name}], {e}, Time:{record_dict}")
--> 147 raise e from e
148 except grpc.FutureTimeoutError as e:

File c:\Users\SKsiltron\Desktop\works\LLM\lib\site-packages\pymilvus\decorators.py:143, in error_handler..wrapper..handler(*args, **kwargs)
142 record_dict["RPC start"] = str(datetime.datetime.now())
--> 143 return func(*args, **kwargs)
144 except MilvusException as e:
...
58 def check_status(status: Status):
59 if status.code != 0 or status.error_code != 0:
---> 60 raise MilvusException(status.code, status.reason, status.error_code)

MilvusException: <MilvusException: (code=0, message=104 data type not supported)>

Anything else?

In my case, I don't think this error is from pymilvus version. I tried changing version several times.

PLZ help me.

@jaylee4274 jaylee4274 added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 17, 2025
@yanliang567
Copy link
Contributor

@jaylee4274 could you please retry with latest milvus 2.4.20 and pymilvus release 2.4.13?
/assign @jaylee4274
/unassign

@yanliang567 yanliang567 added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 17, 2025
@yanliang567
Copy link
Contributor

if you have to run on milvus 2.4.0, then please try to upgrade pymilvus to 2.4.0 as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

2 participants