milvus package¶
Subpackages¶
Submodules¶
milvus.settings module¶
-
class
milvus.settings.
ColorfulFormatter
(fmt=None, datefmt=None, style='%')[source]¶ Bases:
logging.Formatter
,milvus.settings.ColorFulFormatColMixin
-
format
(record)[source]¶ Format the specified record as text.
The record's attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.
-
Module contents¶
-
milvus.
Milvus
¶ alias of
milvus.client.grpc_client.GrpcMilvus
-
class
milvus.
Prepare
[source]¶ Bases:
object
-
classmethod
index
(index_type, nlist)[source]¶ - Parameters
index_type (IndexType) -- index type
nlist --
- Returns
-
classmethod
range
(start_date, end_date)[source]¶ Parser a 'yyyy-mm-dd' like str or date/datetime object to Range object
Range: (start_date, end_date]
start_date : '2019-05-25'
- Parameters
start_date (str, date, datetime) -- start date
end_date (str, date, datetime) -- end date
- Returns
Range object
-
classmethod
ranges
(ranges)[source]¶ prepare query_ranges
- Parameters
ranges -- prepare query_ranges
- Returns
list[Range]
-
classmethod
-
class
milvus.
Status
(code=0, message='Success')[source]¶ Bases:
object
- Attribute code
int (optional) default as ok
- Attribute message
str (optional) current status message
-
BUILD_INDEX_ERROR
= 21¶
-
CACHE_FAILED
= 16¶
-
CANNOT_CREATE_FILE
= 18¶
-
CANNOT_CREATE_FOLDER
= 17¶
-
CANNOT_DELETE_FILE
= 20¶
-
CANNOT_DELETE_FOLDER
= 19¶
-
CONNECT_FAILED
= 2¶
-
FILE_NOT_FOUND
= 14¶
-
ILLEGAL_ARGUMENT
= 5¶
-
ILLEGAL_DIMENSION
= 7¶
-
ILLEGAL_INDEX_TYPE
= 8¶
-
ILLEGAL_METRIC_TYPE
= 23¶
-
ILLEGAL_NLIST
= 22¶
-
ILLEGAL_RANGE
= 6¶
-
ILLEGAL_ROWRECORD
= 11¶
-
ILLEGAL_SEARCH_RESULT
= 13¶
-
ILLEGAL_TABLE_NAME
= 9¶
-
ILLEGAL_TOPK
= 10¶
-
ILLEGAL_VECTOR_ID
= 12¶
-
META_FAILED
= 15¶
-
OUT_OF_MEMORY
= 24¶
-
PERMISSION_DENIED
= 3¶
-
SUCCESS
= 0¶
-
TABLE_NOT_EXISTS
= 4¶
-
UNEXPECTED_ERROR
= 1¶
-
class
milvus.
IndexType
[source]¶ Bases:
enum.IntEnum
An enumeration.
-
FLAT
= 1¶
-
INVALID
= 0¶
-
IVFLAT
= 2¶
-
IVF_FLAT
= 2¶
-
IVF_SQ8
= 3¶
-
IVF_SQ8H
= 5¶
-
IVF_SQ8_H
= 5¶
-
MIX_NSG
= 4¶
-
-
exception
milvus.
NotConnectError
[source]¶ Bases:
milvus.client.exceptions.ConnectError
Disconnect error
-
exception
milvus.
RepeatingConnectError
[source]¶ Bases:
milvus.client.exceptions.ConnectError
Try to connect repeatedly