animeic 2 years ago
parent
commit
e88f18de4e

BIN
src/__pycache__/config.cpython-310.pyc


BIN
src/__pycache__/encode.cpython-310.pyc


BIN
src/__pycache__/logs.cpython-310.pyc


BIN
src/__pycache__/milvus_helpers.cpython-310.pyc


BIN
src/__pycache__/operators.cpython-310.pyc


+ 470 - 0
src/logs/milvus-2023-03-06.log

@@ -0,0 +1,470 @@
+2023-03-06 17:28:39,103 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 17:28:41,543 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 17:28:41,543 | INFO | main.py | <module> | 33 | mkdir the path:tmp/images
+2023-03-06 17:28:41,548 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 17:28:44,992 | ERROR | main.py | delete_record | 139 | do_delete() missing 1 required positional argument: 'milvus_client'
+2023-03-06 17:29:42,061 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 17:29:44,064 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 17:29:44,069 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 17:29:47,768 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=failed to create expr plan, expr = product_id = "63a6dd57cd3dd570bb943e8")>, <Time:{'RPC start': '2023-03-06 17:29:47.407174', 'RPC error': '2023-03-06 17:29:47.768774'}>
+2023-03-06 17:29:47,769 | ERROR | milvus_helpers.py | delete_record | 129 | Failed to  delete record: <MilvusException: (code=1, message=failed to create expr plan, expr = product_id = "63a6dd57cd3dd570bb943e8")>
+2023-03-06 17:31:54,454 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=failed to create expr plan, expr = product_id = "63a6dd57cd3dd570bb943e81")>, <Time:{'RPC start': '2023-03-06 17:31:54.096061', 'RPC error': '2023-03-06 17:31:54.454482'}>
+2023-03-06 17:31:54,454 | ERROR | milvus_helpers.py | delete_record | 129 | Failed to  delete record: <MilvusException: (code=1, message=failed to create expr plan, expr = product_id = "63a6dd57cd3dd570bb943e81")>
+2023-03-06 17:32:05,295 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=invalid plan node type, only pk in [1, 2] supported)>, <Time:{'RPC start': '2023-03-06 17:32:04.922821', 'RPC error': '2023-03-06 17:32:05.295858'}>
+2023-03-06 17:32:05,296 | ERROR | milvus_helpers.py | delete_record | 129 | Failed to  delete record: <MilvusException: (code=1, message=invalid plan node type, only pk in [1, 2] supported)>
+2023-03-06 17:33:08,063 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=failed to create expr plan, expr = product_id like "63a6dd57cd3dd570bb943e81")>, <Time:{'RPC start': '2023-03-06 17:33:07.690700', 'RPC error': '2023-03-06 17:33:08.063115'}>
+2023-03-06 17:33:08,063 | ERROR | milvus_helpers.py | delete_record | 129 | Failed to  delete record: <MilvusException: (code=1, message=failed to create expr plan, expr = product_id like "63a6dd57cd3dd570bb943e81")>
+2023-03-06 17:33:40,236 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=failed to create expr plan, expr = product_id like \"63a6dd57cd3dd570bb943e81\")>, <Time:{'RPC start': '2023-03-06 17:33:39.869054', 'RPC error': '2023-03-06 17:33:40.236145'}>
+2023-03-06 17:33:40,236 | ERROR | milvus_helpers.py | delete_record | 129 | Failed to  delete record: <MilvusException: (code=1, message=failed to create expr plan, expr = product_id like \"63a6dd57cd3dd570bb943e81\")>
+2023-03-06 17:33:53,369 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=failed to create expr plan, expr = product_id like \"63a6dd57cd3dd570bb943e81%\")>, <Time:{'RPC start': '2023-03-06 17:33:53.005860', 'RPC error': '2023-03-06 17:33:53.369437'}>
+2023-03-06 17:33:53,369 | ERROR | milvus_helpers.py | delete_record | 129 | Failed to  delete record: <MilvusException: (code=1, message=failed to create expr plan, expr = product_id like \"63a6dd57cd3dd570bb943e81%\")>
+2023-03-06 17:40:57,831 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=invalid expression, we only support to delete by pk, expr: product_id in ["63a6dd57cd3dd570bb943e8"])>, <Time:{'RPC start': '2023-03-06 17:40:57.437318', 'RPC error': '2023-03-06 17:40:57.831342'}>
+2023-03-06 17:40:57,831 | ERROR | milvus_helpers.py | delete_record | 129 | Failed to  delete record: <MilvusException: (code=1, message=invalid expression, we only support to delete by pk, expr: product_id in ["63a6dd57cd3dd570bb943e8"])>
+2023-03-06 17:41:28,115 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=failed to create expr plan, expr = id in ["63a6dd57cd3dd570bb943e8"])>, <Time:{'RPC start': '2023-03-06 17:41:27.753176', 'RPC error': '2023-03-06 17:41:28.114992'}>
+2023-03-06 17:41:28,115 | ERROR | milvus_helpers.py | delete_record | 129 | Failed to  delete record: <MilvusException: (code=1, message=failed to create expr plan, expr = id in ["63a6dd57cd3dd570bb943e8"])>
+2023-03-06 17:44:23,217 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=failed to create expr plan, expr = id == "63a6dd57cd3dd570bb943e8")>, <Time:{'RPC start': '2023-03-06 17:44:22.839528', 'RPC error': '2023-03-06 17:44:23.217525'}>
+2023-03-06 17:44:23,217 | ERROR | milvus_helpers.py | delete_record | 129 | Failed to  delete record: <MilvusException: (code=1, message=failed to create expr plan, expr = id == "63a6dd57cd3dd570bb943e8")>
+2023-03-06 17:44:48,840 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=invalid plan node type, only pk in [1, 2] supported)>, <Time:{'RPC start': '2023-03-06 17:44:48.479296', 'RPC error': '2023-03-06 17:44:48.840905'}>
+2023-03-06 17:44:48,841 | ERROR | milvus_helpers.py | delete_record | 129 | Failed to  delete record: <MilvusException: (code=1, message=invalid plan node type, only pk in [1, 2] supported)>
+2023-03-06 17:45:24,167 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=failed to create expr plan, expr = id in [63a6dd57cd3dd570bb943e8])>, <Time:{'RPC start': '2023-03-06 17:45:23.794112', 'RPC error': '2023-03-06 17:45:24.167685'}>
+2023-03-06 17:45:24,167 | ERROR | milvus_helpers.py | delete_record | 129 | Failed to  delete record: <MilvusException: (code=1, message=failed to create expr plan, expr = id in [63a6dd57cd3dd570bb943e8])>
+2023-03-06 17:45:44,410 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=failed to create expr plan, expr = id in [1])>, <Time:{'RPC start': '2023-03-06 17:45:44.051925', 'RPC error': '2023-03-06 17:45:44.410012'}>
+2023-03-06 17:45:44,410 | ERROR | milvus_helpers.py | delete_record | 129 | Failed to  delete record: <MilvusException: (code=1, message=failed to create expr plan, expr = id in [1])>
+2023-03-06 17:46:22,135 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=failed to create expr plan, expr = id in [63a6dd57cd3dd570bb943e81])>, <Time:{'RPC start': '2023-03-06 17:46:21.768505', 'RPC error': '2023-03-06 17:46:22.135052'}>
+2023-03-06 17:46:22,135 | ERROR | milvus_helpers.py | delete_record | 129 | Failed to  delete record: <MilvusException: (code=1, message=failed to create expr plan, expr = id in [63a6dd57cd3dd570bb943e81])>
+2023-03-06 17:46:50,257 | DEBUG | milvus_helpers.py | delete_record | 126 | Successfully delete record
+2023-03-06 17:46:59,158 | DEBUG | milvus_helpers.py | delete_record | 126 | Successfully delete record
+2023-03-06 17:47:06,454 | DEBUG | milvus_helpers.py | delete_record | 126 | Successfully delete record
+2023-03-06 17:47:22,243 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 17:47:22,243 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 17:47:22,243 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 17:47:22,243 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:47:22,244 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 17:47:22,244 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 17:47:22,244 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:47:22,244 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 17:47:22,244 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 17:47:22,245 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:124686]
+2023-03-06 17:47:22,245 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 17:47:22,245 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 17:47:23,135 | ERROR | operators.py | do_search | 69 | Error with search : object of type 'NoneType' has no len()
+2023-03-06 17:49:51,202 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 17:49:53,054 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 17:49:53,058 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 17:50:09,730 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 17:50:09,730 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 17:50:09,730 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 17:50:09,730 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:50:09,730 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 17:50:09,730 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 17:50:09,730 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:50:09,730 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 17:50:09,731 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 17:50:09,731 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:124686]
+2023-03-06 17:50:09,731 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 17:50:09,731 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 17:50:11,347 | ERROR | decorators.py | handler | 108 | RPC error: [search], <ParamError: (code=1, message=`partition_name_array` value [None] is illegal)>, <Time:{'RPC start': '2023-03-06 17:50:11.347672', 'RPC error': '2023-03-06 17:50:11.347722'}>
+2023-03-06 17:50:11,347 | ERROR | milvus_helpers.py | search_vectors | 151 | Failed to search vectors in Milvus: <ParamError: (code=1, message=`partition_name_array` value [None] is illegal)>
+2023-03-06 17:51:48,368 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 17:51:50,473 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 17:51:50,479 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 17:51:51,965 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 17:51:51,965 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 17:51:51,965 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 17:51:51,965 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:51:51,965 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 17:51:51,965 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 17:51:51,966 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:51:51,966 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 17:51:51,966 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 17:51:51,967 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:124686]
+2023-03-06 17:51:51,967 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 17:51:51,967 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 17:51:53,611 | ERROR | decorators.py | handler | 108 | RPC error: [search], <ParamError: (code=1, message=`partition_name_array` value [None] is illegal)>, <Time:{'RPC start': '2023-03-06 17:51:53.611544', 'RPC error': '2023-03-06 17:51:53.611613'}>
+2023-03-06 17:51:53,611 | ERROR | milvus_helpers.py | search_vectors | 154 | Failed to search vectors in Milvus: <ParamError: (code=1, message=`partition_name_array` value [None] is illegal)>
+2023-03-06 17:52:52,387 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 17:52:54,599 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 17:52:54,603 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 17:52:56,625 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 17:52:56,625 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 17:52:56,625 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 17:52:56,625 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:52:56,625 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 17:52:56,625 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 17:52:56,625 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:52:56,626 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 17:52:56,626 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 17:52:56,627 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:124686]
+2023-03-06 17:52:56,627 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 17:52:56,627 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 17:52:58,270 | ERROR | decorators.py | handler | 108 | RPC error: [search], <ParamError: (code=1, message=`partition_name_array` value [None] is illegal)>, <Time:{'RPC start': '2023-03-06 17:52:58.270903', 'RPC error': '2023-03-06 17:52:58.270952'}>
+2023-03-06 17:52:58,271 | ERROR | milvus_helpers.py | search_vectors | 156 | Failed to search vectors in Milvus: <ParamError: (code=1, message=`partition_name_array` value [None] is illegal)>
+2023-03-06 17:53:47,229 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 17:53:49,323 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 17:53:49,328 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 17:53:58,133 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 17:53:58,133 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 17:53:58,133 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 17:53:58,133 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:53:58,133 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 17:53:58,134 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 17:53:58,134 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:53:58,134 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 17:53:58,134 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 17:53:58,135 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:124686]
+2023-03-06 17:53:58,135 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 17:53:58,135 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 17:53:59,797 | ERROR | decorators.py | handler | 108 | RPC error: [search], <ParamError: (code=1, message=`partition_name_array` value [None] is illegal)>, <Time:{'RPC start': '2023-03-06 17:53:59.796869', 'RPC error': '2023-03-06 17:53:59.796949'}>
+2023-03-06 17:53:59,797 | ERROR | milvus_helpers.py | search_vectors | 156 | Failed to search vectors in Milvus: <ParamError: (code=1, message=`partition_name_array` value [None] is illegal)>
+2023-03-06 17:55:11,901 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 17:55:14,635 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 17:55:14,640 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 17:55:18,176 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 17:55:18,176 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 17:55:18,176 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 17:55:18,176 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:55:18,176 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 17:55:18,176 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 17:55:18,176 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:55:18,176 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 17:55:18,177 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 17:55:18,178 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32795]
+2023-03-06 17:55:18,178 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 17:55:18,179 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32770]
+2023-03-06 17:55:18,179 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:1]
+2023-03-06 17:55:18,179 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[32771:32795]
+2023-03-06 17:55:18,180 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:59150]
+2023-03-06 17:55:18,180 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 17:55:18,180 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 17:55:19,849 | ERROR | decorators.py | handler | 108 | RPC error: [search], <ParamError: (code=1, message=`partition_name_array` value [None] is illegal)>, <Time:{'RPC start': '2023-03-06 17:55:19.849288', 'RPC error': '2023-03-06 17:55:19.849339'}>
+2023-03-06 17:55:19,849 | ERROR | milvus_helpers.py | search_vectors | 157 | Failed to search vectors in Milvus: <ParamError: (code=1, message=`partition_name_array` value [None] is illegal)>
+2023-03-06 17:57:37,191 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 17:57:39,453 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 17:57:39,457 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 17:57:40,619 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 17:57:40,619 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 17:57:40,619 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 17:57:40,619 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:57:40,619 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 17:57:40,619 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 17:57:40,619 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:57:40,619 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 17:57:40,619 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 17:57:40,620 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:124686]
+2023-03-06 17:57:40,621 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 17:57:40,621 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 17:57:42,254 | ERROR | decorators.py | handler | 108 | RPC error: [search], <ParamError: (code=1, message=`partition_name_array` value [None] is illegal)>, <Time:{'RPC start': '2023-03-06 17:57:42.254543', 'RPC error': '2023-03-06 17:57:42.254594'}>
+2023-03-06 17:57:42,254 | ERROR | milvus_helpers.py | search_vectors | 154 | Failed to search vectors in Milvus: <ParamError: (code=1, message=`partition_name_array` value [None] is illegal)>
+2023-03-06 17:59:39,684 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 17:59:41,680 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 17:59:41,686 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 17:59:44,036 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 17:59:44,036 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 17:59:44,036 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 17:59:44,036 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:59:44,036 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 17:59:44,036 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 17:59:44,037 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 17:59:44,037 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 17:59:44,037 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 17:59:44,038 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32795]
+2023-03-06 17:59:44,038 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 17:59:44,039 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32770]
+2023-03-06 17:59:44,039 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:1]
+2023-03-06 17:59:44,039 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[32771:32795]
+2023-03-06 17:59:44,039 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 17:59:44,040 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:26409]
+2023-03-06 17:59:44,040 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 17:59:44,040 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 17:59:44,940 | ERROR | operators.py | do_search | 69 | Error with search : can only concatenate str (not "NoneType") to str
+2023-03-06 18:00:36,784 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 18:00:38,682 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 18:00:38,687 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 18:00:40,281 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 18:00:40,281 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 18:00:40,281 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 18:00:40,281 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:00:40,281 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 18:00:40,281 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 18:00:40,281 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:00:40,281 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 18:00:40,282 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 18:00:40,283 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:124686]
+2023-03-06 18:00:40,283 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 18:00:40,283 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 18:00:41,233 | ERROR | operators.py | do_search | 69 | Error with search : can only concatenate str (not "NoneType") to str
+2023-03-06 18:01:08,603 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 18:01:10,448 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 18:01:10,453 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 18:01:17,479 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 18:01:17,479 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 18:01:17,479 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 18:01:17,479 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:01:17,479 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 18:01:17,479 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 18:01:17,479 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:01:17,479 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 18:01:17,480 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 18:01:17,480 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:124686]
+2023-03-06 18:01:17,480 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 18:01:17,481 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 18:01:18,385 | ERROR | operators.py | do_search | 69 | Error with search : can only concatenate str (not "list") to str
+2023-03-06 18:04:23,022 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 18:04:25,175 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 18:04:25,180 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 18:04:27,198 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 18:04:27,198 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 18:04:27,199 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 18:04:27,199 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:04:27,199 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 18:04:27,199 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 18:04:27,199 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:04:27,199 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 18:04:27,199 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 18:04:27,200 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:29888]
+2023-03-06 18:04:27,200 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:1]
+2023-03-06 18:04:27,200 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[29889:32795]
+2023-03-06 18:04:27,201 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 18:04:27,201 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:28265]
+2023-03-06 18:04:27,201 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:1]
+2023-03-06 18:04:27,201 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[28266:32770]
+2023-03-06 18:04:27,201 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:1]
+2023-03-06 18:04:27,201 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[32771:32795]
+2023-03-06 18:04:27,202 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 18:04:27,203 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:26409]
+2023-03-06 18:04:27,204 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 18:04:27,204 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 18:04:29,842 | DEBUG | milvus_helpers.py | search_vectors | 145 | Successfully search in collection: ["['(distance: 1.7845512628555298, id: e25e256d7e746cbade48661e2a0989e1563f98ea2de96af458fc447190b4eceb)']"]
+2023-03-06 18:04:29,842 | INFO | main.py | search_images | 123 | Successfully searched similar images!
+2023-03-06 18:05:02,210 | DEBUG | milvus_helpers.py | delete_record | 126 | Successfully delete record
+2023-03-06 18:06:45,544 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=invalid expression, we only support to delete by pk, expr: product_id in ["63a6dd57cd3dd570bb943e81"])>, <Time:{'RPC start': '2023-03-06 18:06:45.168545', 'RPC error': '2023-03-06 18:06:45.544947'}>
+2023-03-06 18:06:45,545 | ERROR | milvus_helpers.py | delete_record | 129 | Failed to  delete record: <MilvusException: (code=1, message=invalid expression, we only support to delete by pk, expr: product_id in ["63a6dd57cd3dd570bb943e81"])>
+2023-03-06 18:07:08,492 | DEBUG | milvus_helpers.py | delete_record | 126 | Successfully delete record
+2023-03-06 18:07:24,733 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 18:07:24,733 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 18:07:24,733 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 18:07:24,733 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:07:24,733 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 18:07:24,733 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 18:07:24,733 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:07:24,734 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 18:07:24,734 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 18:07:24,734 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:29888]
+2023-03-06 18:07:24,734 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:1]
+2023-03-06 18:07:24,734 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[29889:32795]
+2023-03-06 18:07:24,735 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 18:07:24,735 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32770]
+2023-03-06 18:07:24,735 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:1]
+2023-03-06 18:07:24,735 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[32771:32795]
+2023-03-06 18:07:24,736 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 18:07:24,736 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:26409]
+2023-03-06 18:07:24,737 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 18:07:24,737 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 18:07:26,512 | DEBUG | milvus_helpers.py | search_vectors | 145 | Successfully search in collection: ['[]']
+2023-03-06 18:07:26,512 | INFO | main.py | search_images | 123 | Successfully searched similar images!
+2023-03-06 18:08:41,838 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 18:08:44,389 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 18:08:44,394 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 18:08:47,260 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 18:08:47,260 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 18:08:47,260 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:120]
+2023-03-06 18:08:47,260 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:08:47,260 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[122:134]
+2023-03-06 18:08:47,260 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[136:145]
+2023-03-06 18:08:47,260 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:08:47,260 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 18:08:47,261 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 18:08:47,261 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:80891]
+2023-03-06 18:08:47,261 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 18:08:47,262 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 18:08:50,688 | ERROR | milvus_helpers.py | create_partition | 74 | Failed to load data to Milvus: 'MilvusHelper' object has no attribute 'has_partition'
+2023-03-06 18:09:49,620 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 18:09:52,200 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 18:09:52,205 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 18:09:55,822 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 18:09:55,823 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 18:09:55,823 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:120]
+2023-03-06 18:09:55,823 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:09:55,823 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[122:134]
+2023-03-06 18:09:55,823 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[136:145]
+2023-03-06 18:09:55,823 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:09:55,823 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 18:09:55,823 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 18:09:55,824 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:80891]
+2023-03-06 18:09:55,824 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 18:09:55,824 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 18:09:58,838 | ERROR | decorators.py | handler | 108 | RPC error: [has_partition], <ParamError: (code=1, message=`partition_name` value None is illegal)>, <Time:{'RPC start': '2023-03-06 18:09:58.838778', 'RPC error': '2023-03-06 18:09:58.838818'}>
+2023-03-06 18:09:58,839 | ERROR | milvus_helpers.py | create_partition | 74 | Failed to load data to Milvus: <ParamError: (code=1, message=`partition_name` value None is illegal)>
+2023-03-06 18:12:59,339 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 18:13:01,316 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 18:13:01,321 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 18:13:03,608 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 18:13:03,608 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 18:13:03,608 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:120]
+2023-03-06 18:13:03,608 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:13:03,608 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[122:134]
+2023-03-06 18:13:03,608 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[136:145]
+2023-03-06 18:13:03,608 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:13:03,608 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 18:13:03,609 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 18:13:03,609 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:80891]
+2023-03-06 18:13:03,609 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 18:13:03,609 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 18:13:06,962 | ERROR | decorators.py | handler | 108 | RPC error: [has_partition], <ParamError: (code=1, message=`partition_name` value None is illegal)>, <Time:{'RPC start': '2023-03-06 18:13:06.962138', 'RPC error': '2023-03-06 18:13:06.962178'}>
+2023-03-06 18:13:06,962 | ERROR | milvus_helpers.py | create_partition | 75 | Failed to load data to Milvus: <ParamError: (code=1, message=`partition_name` value None is illegal)>
+2023-03-06 18:19:17,385 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 18:19:19,391 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 18:19:19,396 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 18:19:22,042 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 18:19:22,043 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 18:19:22,043 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:120]
+2023-03-06 18:19:22,043 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:19:22,043 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[122:134]
+2023-03-06 18:19:22,043 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[136:145]
+2023-03-06 18:19:22,043 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:19:22,043 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 18:19:22,045 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 18:19:22,045 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:4382]
+2023-03-06 18:19:22,046 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:1]
+2023-03-06 18:19:22,046 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[4383:32795]
+2023-03-06 18:19:22,062 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 18:19:22,062 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32795]
+2023-03-06 18:19:22,063 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:15355]
+2023-03-06 18:19:22,097 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 18:19:22,097 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 18:19:24,831 | ERROR | milvus_helpers.py | insert | 92 | Failed to load data to Milvus: <DataTypeNotSupportException: (code=1, message=Field dtype must be of DataType)>
+2023-03-06 18:23:10,300 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 18:23:10,300 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 18:23:10,300 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:120]
+2023-03-06 18:23:10,300 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:23:10,300 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[122:134]
+2023-03-06 18:23:10,300 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[136:145]
+2023-03-06 18:23:10,301 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:23:10,301 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 18:23:10,301 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 18:23:10,302 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:80891]
+2023-03-06 18:23:10,302 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 18:23:10,302 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 18:23:14,549 | DEBUG | milvus_helpers.py | create_index | 102 | Successfully create index in collection:user_63e9d7dc312f6d0f552dcdd2 with param:{'index_type': 'IVF_FLAT', 'metric_type': 'L2', 'params': {'nlist': 16384}}
+2023-03-06 18:23:14,549 | DEBUG | milvus_helpers.py | create_collection | 55 | Create Milvus collection: user_63e9d7dc312f6d0f552dcdd2
+2023-03-06 18:23:15,339 | ERROR | milvus_helpers.py | insert | 92 | Failed to load data to Milvus: <DataTypeNotSupportException: (code=1, message=Field dtype must be of DataType)>
+2023-03-06 18:23:33,278 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 18:23:33,278 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 18:23:33,278 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:120]
+2023-03-06 18:23:33,278 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:23:33,278 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[122:134]
+2023-03-06 18:23:33,278 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[136:145]
+2023-03-06 18:23:33,278 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:23:33,278 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 18:23:33,279 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 18:23:33,279 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 18:23:33,280 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:15355]
+2023-03-06 18:23:33,280 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 18:23:33,280 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 18:23:37,321 | DEBUG | milvus_helpers.py | create_index | 102 | Successfully create index in collection:user_63e9d7dc312f6d0f552dcdd3 with param:{'index_type': 'IVF_FLAT', 'metric_type': 'L2', 'params': {'nlist': 16384}}
+2023-03-06 18:23:37,321 | DEBUG | milvus_helpers.py | create_collection | 55 | Create Milvus collection: user_63e9d7dc312f6d0f552dcdd3
+2023-03-06 18:23:38,102 | ERROR | milvus_helpers.py | insert | 92 | Failed to load data to Milvus: <DataTypeNotSupportException: (code=1, message=Field dtype must be of DataType)>
+2023-03-06 18:24:03,059 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 18:24:03,059 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 18:24:03,059 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:120]
+2023-03-06 18:24:03,060 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:24:03,060 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[122:134]
+2023-03-06 18:24:03,060 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[136:145]
+2023-03-06 18:24:03,060 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:24:03,060 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 18:24:03,060 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 18:24:03,061 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 18:24:03,068 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:15355]
+2023-03-06 18:24:03,072 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 18:24:03,072 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 18:24:07,664 | DEBUG | milvus_helpers.py | create_index | 102 | Successfully create index in collection:user_63e9d7dc312f6d0f552dcdd4 with param:{'index_type': 'IVF_FLAT', 'metric_type': 'L2', 'params': {'nlist': 16384}}
+2023-03-06 18:24:07,664 | DEBUG | milvus_helpers.py | create_collection | 55 | Create Milvus collection: user_63e9d7dc312f6d0f552dcdd4
+2023-03-06 18:24:11,941 | DEBUG | milvus_helpers.py | insert | 88 | Insert vectors to Milvus in collection: user_63e9d7dc312f6d0f552dcdd4 with 1 rows
+2023-03-06 18:24:11,941 | INFO | main.py | upload_images | 97 | Successfully uploaded data, vector id: ['e25e256d7e746cbade48661e2a0989e1563f98ea2de96af458fc447190b4eceb']
+2023-03-06 18:24:40,677 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 18:24:40,677 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 18:24:40,677 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 18:24:40,677 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:24:40,677 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 18:24:40,677 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 18:24:40,677 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:24:40,677 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 18:24:40,678 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 18:24:40,678 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:124686]
+2023-03-06 18:24:40,679 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 18:24:40,679 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 18:24:42,790 | DEBUG | milvus_helpers.py | search_vectors | 146 | Successfully search in collection: ["['(distance: 1.7845512628555298, id: e25e256d7e746cbade48661e2a0989e1563f98ea2de96af458fc447190b4eceb)']"]
+2023-03-06 18:24:42,790 | INFO | main.py | search_images | 123 | Successfully searched similar images!
+2023-03-06 18:25:00,994 | DEBUG | milvus_helpers.py | delete_record | 127 | Successfully delete record
+2023-03-06 18:25:00,994 | ERROR | main.py | delete_record | 141 | 'MutationResult' object has no attribute 'result'
+2023-03-06 18:26:06,402 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 18:26:08,424 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 18:26:08,428 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 18:26:13,133 | DEBUG | milvus_helpers.py | delete_record | 127 | Successfully delete record
+2023-03-06 18:26:38,576 | DEBUG | milvus_helpers.py | delete_record | 127 | Successfully delete record
+2023-03-06 18:26:52,236 | DEBUG | milvus_helpers.py | delete_record | 127 | Successfully delete record
+2023-03-06 18:30:28,180 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 18:30:30,160 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 18:30:30,165 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 18:30:52,942 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=failed to create expr plan, expr = im_hash in [{im_hash}])>, <Time:{'RPC start': '2023-03-06 18:30:52.570045', 'RPC error': '2023-03-06 18:30:52.942523'}>
+2023-03-06 18:30:52,942 | ERROR | milvus_helpers.py | delete_record | 130 | Failed to  delete record: <MilvusException: (code=1, message=failed to create expr plan, expr = im_hash in [{im_hash}])>
+2023-03-06 18:32:01,258 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 18:32:03,724 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 18:32:03,729 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 18:32:17,719 | ERROR | decorators.py | handler | 108 | RPC error: [delete], <MilvusException: (code=1, message=failed to create expr plan, expr = im_hash in [e25e256d7e746cbade48661e2a0989e1563f98ea2de96af458fc447190b4eceb])>, <Time:{'RPC start': '2023-03-06 18:32:17.345639', 'RPC error': '2023-03-06 18:32:17.719919'}>
+2023-03-06 18:32:17,720 | ERROR | milvus_helpers.py | delete_record | 130 | Failed to  delete record: <MilvusException: (code=1, message=failed to create expr plan, expr = im_hash in [e25e256d7e746cbade48661e2a0989e1563f98ea2de96af458fc447190b4eceb])>
+2023-03-06 18:35:21,354 | INFO | helpers.py | load_pretrained | 247 | Loading pretrained weights from url (https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth)
+2023-03-06 18:35:23,826 | DEBUG | milvus_helpers.py | __init__ | 22 | Successfully connect to Milvus with IP:103.143.81.176 and PORT:19530
+2023-03-06 18:35:23,830 | DEBUG | selector_events.py | __init__ | 54 | Using selector: EpollSelector
+2023-03-06 18:35:28,758 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 18:35:28,758 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 18:35:28,758 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 18:35:28,758 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:35:28,758 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 18:35:28,758 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 18:35:28,758 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:35:28,758 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 18:35:28,759 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 18:35:28,759 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:124686]
+2023-03-06 18:35:28,759 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 18:35:28,760 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 18:35:30,945 | DEBUG | milvus_helpers.py | search_vectors | 146 | Successfully search in collection: ["['(distance: 1.7845512628555298, id: e25e256d7e746cbade48661e2a0989e1563f98ea2de96af458fc447190b4eceb)']"]
+2023-03-06 18:35:30,946 | INFO | main.py | search_images | 123 | Successfully searched similar images!
+2023-03-06 18:35:38,575 | DEBUG | milvus_helpers.py | delete_record | 127 | Successfully delete record
+2023-03-06 18:35:50,091 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 18:35:50,091 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 18:35:50,091 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 18:35:50,091 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:35:50,091 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 18:35:50,091 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 18:35:50,091 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:35:50,091 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 18:35:50,092 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:65536]
+2023-03-06 18:35:50,092 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:124686]
+2023-03-06 18:35:50,092 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 18:35:50,092 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 18:35:51,426 | DEBUG | milvus_helpers.py | search_vectors | 146 | Successfully search in collection: ["['(distance: 1.7845512628555298, id: e25e256d7e746cbade48661e2a0989e1563f98ea2de96af458fc447190b4eceb)']"]
+2023-03-06 18:35:51,426 | INFO | main.py | search_images | 123 | Successfully searched similar images!
+2023-03-06 18:36:09,157 | DEBUG | milvus_helpers.py | delete_record | 127 | Successfully delete record
+2023-03-06 18:36:11,446 | DEBUG | multipart.py | callback | 604 | Calling on_part_begin with no data
+2023-03-06 18:36:11,446 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[54:73]
+2023-03-06 18:36:11,446 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[75:137]
+2023-03-06 18:36:11,446 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:36:11,446 | DEBUG | multipart.py | callback | 601 | Calling on_header_field with data[139:151]
+2023-03-06 18:36:11,446 | DEBUG | multipart.py | callback | 601 | Calling on_header_value with data[153:163]
+2023-03-06 18:36:11,446 | DEBUG | multipart.py | callback | 604 | Calling on_header_end with no data
+2023-03-06 18:36:11,446 | DEBUG | multipart.py | callback | 604 | Calling on_headers_finished with no data
+2023-03-06 18:36:11,447 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 18:36:11,447 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32795]
+2023-03-06 18:36:11,448 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 18:36:11,448 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:28265]
+2023-03-06 18:36:11,448 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:1]
+2023-03-06 18:36:11,448 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[28266:32770]
+2023-03-06 18:36:11,449 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:1]
+2023-03-06 18:36:11,449 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[32771:32795]
+2023-03-06 18:36:11,451 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:32741]
+2023-03-06 18:36:11,458 | DEBUG | multipart.py | callback | 601 | Calling on_part_data with data[0:26409]
+2023-03-06 18:36:11,458 | DEBUG | multipart.py | callback | 604 | Calling on_part_end with no data
+2023-03-06 18:36:11,458 | DEBUG | multipart.py | callback | 604 | Calling on_end with no data
+2023-03-06 18:36:13,196 | DEBUG | milvus_helpers.py | search_vectors | 146 | Successfully search in collection: ['[]']
+2023-03-06 18:36:13,196 | INFO | main.py | search_images | 123 | Successfully searched similar images!

+ 11 - 6
src/main.py

@@ -104,7 +104,7 @@ async def upload_images(
 @app.post('/img/search')
 async def search_images(
     table_name: str = None,
-    partition_name: str = None,
+    partition_names: list = [],
     image: UploadFile = File(...),
     limit: int = TOP_K
 ):
@@ -113,7 +113,7 @@ async def search_images(
         img_path = os.path.join(UPLOAD_PATH, image.filename)
         with open(img_path, "wb+") as f:
             f.write(content)
-        res = do_search(table_name,partition_name,img_path, limit, MODEL, MILVUS_CLI)
+        res = do_search(table_name,partition_names,img_path, limit, MODEL, MILVUS_CLI)
         list = []
         for hits in res:
             for hit in hits:
@@ -128,12 +128,17 @@ async def search_images(
 
 
 @app.post('/delete/record')
-async def delete_record(table_name: str = None,partition_name: str=None,expr: str=None):
-    if len(expr) < 1:
+async def delete_record(table_name: str = None,partition_name: str=None,im_hash: str=''):
+    expr = "im_hash in []"
+    if len(im_hash) < 1:
         return {'status': False, 'msg': 'expr is not empty'}
+    else:
+        expr = "im_hash in [\""+im_hash+"\"]"
     try:
-        res = do_delete(table_name,partition_name,expr)
-        print(res)
+        # (insert count: 0, delete count: 1, upsert count: 0, timestamp: 439903086695153665, success count: 0, err count: 0)
+        # (insert count: 0, delete count: 1, upsert count: 0, timestamp: 439903119803940865, success count: 0, err count: 0)
+        res = do_delete(table_name,partition_name,expr,MILVUS_CLI)
+        # print(res.succ_count)
         return {'status': True}
     except Exception as e:
         LOGGER.error(e)

+ 8 - 10
src/milvus_helpers.py

@@ -43,9 +43,9 @@ class MilvusHelper:
         # Create milvus collection if not exists
         try:
             if not self.has_collection(collection_name):
-                im_hash = FieldSchema(name='im_hash', dtype=DataType.VARCHAR, descrition='hash to image', max_length=500,
+                im_hash = FieldSchema(name='im_hash', dtype=DataType.VARCHAR, descrition='id to image', max_length=500,
                                      is_primary=True, auto_id=False)                        
-                product_id = FieldSchema(name='product_id', dtype=DataType.VARCHAR, descrition='id to image', max_length=500,
+                product_id = FieldSchema(name='product_id', dtype=DataType.VARCHAR, descrition='product_id to image', max_length=500,
                                      is_primary=False, auto_id=False)
                 im_vector = FieldSchema(name="im_vector", dtype=DataType.FLOAT_VECTOR, descrition="image vectors",
                                      dim=VECTOR_DIMENSION, is_primary=False)
@@ -64,9 +64,10 @@ class MilvusHelper:
     def create_partition(self, partition_name):
         # Create milvus collection if not exists
         try:
-            if not self.has_partition(partition_name):
-                self.collection.create_partition(partition_name)
-                LOGGER.debug(f"Create Milvus partition: {partition_name}")
+            if partition_name is not None:
+                if not self.collection.has_partition(partition_name):
+                    self.collection.create_partition(partition_name)
+                    LOGGER.debug(f"Create Milvus partition: {partition_name}")
             # else:
                 # self.set_collection(collection_name)
             return "OK"
@@ -129,10 +130,7 @@ class MilvusHelper:
             LOGGER.error(f"Failed to  delete record: {e}")
             sys.exit(1)
 
-    def search_vectors(self, collection_name,partition_name,im_vector, top_k):
-        partition = None
-        if len(partition_name) > 0:
-            partition = [partition_name] 
+    def search_vectors(self, collection_name,partition_names,im_vector, top_k):
         try:
             self.set_collection(collection_name)
             search_params = {"metric_type": METRIC_TYPE, "params": {"nprobe": 16}}
@@ -143,7 +141,7 @@ class MilvusHelper:
                 limit=top_k,
                 expr= None,
                 # expr= "product_id like \"63a6dd57cd3dd570bb943e81\"",
-                partition_names=partition,
+                partition_names=partition_names,
                 output_fields=["product_id"])
             LOGGER.debug(f"Successfully search in collection: {res}")
             return res

BIN
src/tmp/images/5WzUbGMeeKYNRbKGFEwYfw.jpg


BIN
src/tmp/images/zhang.png