mirror of https://github.com/milvus-io/milvus.git
[skip e2e]Format code style (#15042)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>pull/15024/merge
parent
e2bf0ce787
commit
d1808833a9
|
@ -11,7 +11,8 @@
|
||||||
|
|
||||||
|
|
||||||
import random
|
import random
|
||||||
|
import time
|
||||||
|
import argparse
|
||||||
from pymilvus import (
|
from pymilvus import (
|
||||||
connections, list_collections,
|
connections, list_collections,
|
||||||
FieldSchema, CollectionSchema, DataType,
|
FieldSchema, CollectionSchema, DataType,
|
||||||
|
@ -19,6 +20,7 @@ from pymilvus import (
|
||||||
)
|
)
|
||||||
TIMEOUT = 120
|
TIMEOUT = 120
|
||||||
|
|
||||||
|
|
||||||
def hello_milvus(host="127.0.0.1"):
|
def hello_milvus(host="127.0.0.1"):
|
||||||
import time
|
import time
|
||||||
# create connection
|
# create connection
|
||||||
|
@ -93,7 +95,6 @@ def hello_milvus(host="127.0.0.1"):
|
||||||
# Get value of the random value field for search result
|
# Get value of the random value field for search result
|
||||||
print(hit, hit.entity.get("random_value"))
|
print(hit, hit.entity.get("random_value"))
|
||||||
|
|
||||||
|
|
||||||
# query
|
# query
|
||||||
expr = "count in [2,4,6,8]"
|
expr = "count in [2,4,6,8]"
|
||||||
output_fields = ["count", "random_value"]
|
output_fields = ["count", "random_value"]
|
||||||
|
@ -104,14 +105,9 @@ def hello_milvus(host="127.0.0.1"):
|
||||||
# collection.release()
|
# collection.release()
|
||||||
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='host ip')
|
parser = argparse.ArgumentParser(description='host ip')
|
||||||
parser.add_argument('--host', type=str, default='127.0.0.1', help='host ip')
|
parser.add_argument('--host', type=str, default='127.0.0.1', help='host ip')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
# add time stamp
|
# add time stamp
|
||||||
import time
|
|
||||||
|
|
||||||
print(f"\nStart time: {time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))}")
|
print(f"\nStart time: {time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))}")
|
||||||
hello_milvus(args.host)
|
hello_milvus(args.host)
|
||||||
|
|
Loading…
Reference in New Issue