Comments (4)
@wzt-lx Which version of Milvus are you using? Actually Milvus support varchar datatype now, please update to the newest version.
from examples.
c5ea2019b632 milvusdb/milvus:v2.0.2 "/tini -- milvus run…" 5 days ago Up 2 hours 0.0.0.0:19530->19530/tcp milvus-standalone
6e594cc20871 quay.io/coreos/etcd:v3.5.0 "etcd -advertise-cli…" 5 days ago Up 2 hours 2379-2380/tcp milvus-etcd
76add99367b6 minio/minio:RELEASE.2020-12-03T00-03-10Z "/usr/bin/docker-ent…" 5 days ago Up 2 hours (healthy) 9000/tcp milvus-minio
pymilvus 2.0.2
from examples.
def create_milvus_collection(collection_name, dim):
if utility.has_collection(collection_name):
utility.drop_collection(collection_name)
fields = [
FieldSchema(name='id', dtype=DataType.VARCHAR, descrition='ids', max_length=500, is_primary=True, auto_id=False),
FieldSchema(name='embedding', dtype=DataType.FLOAT_VECTOR, descrition='embedding vectors', dim=dim)
]
schema = CollectionSchema(fields=fields, description='reverse image search')
collection = Collection(name=collection_name, schema=schema)
# create IVF_FLAT index for collection.
index_params = {
'metric_type':'L2',
'index_type':"IVF_FLAT",
'params':{"nlist":2048}
}
collection.create_index(field_name="embedding", index_params=index_params)
return collection
collection = create_milvus_collection('question_answer', 768)
AttributeError Traceback (most recent call last)
Cell In[5], line 21
18 collection.create_index(field_name="embedding", index_params=index_params)
19 return collection
---> 21 collection = create_milvus_collection('question_answer', 768)
Cell In[5], line 6, in create_milvus_collection(collection_name, dim)
2 if utility.has_collection(collection_name):
3 utility.drop_collection(collection_name)
5 fields = [
----> 6 FieldSchema(name='id', dtype=DataType.VARCHAR, descrition='ids', max_length=500, is_primary=True, auto_id=False),
7 FieldSchema(name='embedding', dtype=DataType.FLOAT_VECTOR, descrition='embedding vectors', dim=dim)
8 ]
9 schema = CollectionSchema(fields=fields, description='reverse image search')
10 collection = Collection(name=collection_name, schema=schema)
File D:\anaconda\envs\DL\lib\enum.py:429, in EnumMeta.getattr(cls, name)
427 return cls.member_map[name]
428 except KeyError:
--> 429 raise AttributeError(name) from None
AttributeError: VARCHAR
from examples.
requires pymilvus >= 2.1
from examples.
Related Issues (20)
- text_image_search demo clip_op.train error HOT 1
- Error: CollectionNotExists for example text-to-text search HOT 3
- Collection returns empty in question answering engine. HOT 3
- Use clip to load local model HOT 1
- MilvusException: <MilvusException: (code=2, message=Fail connecting to server on 127.0.0.1:19530. Timeout)> HOT 2
- 以图搜图如何使用自己的模型 HOT 8
- How to free GPU memory HOT 1
- RuntimeError: Loading operator with error:Load operator failed HOT 5
- how to ensure that the model is only loaded once when extracting feature vectors HOT 1
- TypeError: 'torch._C.Node' object is not subscriptable HOT 2
- huggingface_hub.utils._errors.LocalEntryNotFoundError ... HOT 4
- 数据存放失败 HOT 6
- dpr模型无法下载
- convert_video2gif function error
- Gradio界面出来无响应
- Repair two small pits for 1_build_text_image_search_engine.ipynb
- Problem with Running sample NLP Text Search application
- 1_build_image_search_engine更改metric_type为COSINE后,检索时出错【expected=COSINE, actual=L2】 HOT 4
- Error in embeddings pipe HOT 6
- Memory leakage during image feature extraction(OOM)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from examples.