All Microservices in GNES¶
[32mGNES v0.0.47: Generic Neural Elastic Search[0m, a cloud-native semantic search system based on deep neural network. It enables large-scale index and semantic search for text-to-text, image-to-image, video-to-video etc. Visit [4m[36mhttps://docs.gnes.ai[0m for tutorials and documentations.
usage: gnes [-h] [-v] [--verbose]
{frontend,encode,index,route,preprocess,grpc,client,healthcheck}
...
Named Arguments¶
-v, --version | show program’s version number and exit |
--verbose | turn on detailed logging for debug Default: False |
GNES sub-commands¶
use “gnes [sub-command] –help” to get detailed information about each sub-command
cli | Possible choices: frontend, encode, index, route, preprocess, grpc, client, healthcheck |
Sub-commands:¶
frontend¶
start a frontend service
gnes frontend [-h] [--port_in PORT_IN] [--port_out PORT_OUT]
[--host_in HOST_IN] [--host_out HOST_OUT]
[--socket_in {PULL_BIND,PULL_CONNECT,PUSH_BIND,PUSH_CONNECT,SUB_BIND,SUB_CONNECT,PUB_BIND,PUB_CONNECT,PAIR_BIND,PAIR_CONNECT}]
[--socket_out {PULL_BIND,PULL_CONNECT,PUSH_BIND,PUSH_CONNECT,SUB_BIND,SUB_CONNECT,PUB_BIND,PUB_CONNECT,PAIR_BIND,PAIR_CONNECT}]
[--port_ctrl PORT_CTRL] [--timeout TIMEOUT]
[--dump_interval DUMP_INTERVAL] [--read_only]
[--parallel_backend {thread,process}]
[--num_parallel NUM_PARALLEL]
[--parallel_type {PUSH_BLOCK,PUSH_NONBLOCK,PUB_BLOCK,PUB_NONBLOCK}]
[--check_version] [--identity IDENTITY] [--route_table]
[--squeeze_pb] [--ctrl_with_ipc] [--grpc_host GRPC_HOST]
[--grpc_port GRPC_PORT] [--max_message_size MAX_MESSAGE_SIZE]
[--proxy] [--max_concurrency MAX_CONCURRENCY]
[--dump_route DUMP_ROUTE]
[--max_pending_request MAX_PENDING_REQUEST]
Named Arguments¶
--port_in | port for input data, default a random port between [49152, 65536] Default: 52677 |
--port_out | port for output data, default a random port between [49152, 65536] Default: 54479 |
--host_in | host address for input Default: “0.0.0.0” |
--host_out | host address for output Default: “0.0.0.0” |
--socket_in | Possible choices: PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT, SUB_BIND, SUB_CONNECT, PUB_BIND, PUB_CONNECT, PAIR_BIND, PAIR_CONNECT socket type for input port Default: PULL_BIND |
--socket_out | Possible choices: PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT, SUB_BIND, SUB_CONNECT, PUB_BIND, PUB_CONNECT, PAIR_BIND, PAIR_CONNECT socket type for output port Default: PUSH_BIND |
--port_ctrl | port for controlling the service, default a random port between [49152, 65536] Default: 62916 |
--timeout | timeout (ms) of all communication, -1 for waiting forever Default: -1 |
--dump_interval | |
serialize the model in the service every n seconds if model changes. -1 means –read_only. Default: 5 | |
--read_only | do not allow the service to modify the model, dump_interval will be ignored Default: True |
--parallel_backend | |
Possible choices: thread, process parallel backend of the service Default: “thread” | |
--num_parallel, --replicas | |
number of parallel services running at the same time (i.e. replicas), port_in and port_out will be set to random, and routers will be added automatically when necessary Default: 1 | |
--parallel_type, --replica_type | |
Possible choices: PUSH_BLOCK, PUSH_NONBLOCK, PUB_BLOCK, PUB_NONBLOCK parallel type of the concurrent services Default: PUSH_NONBLOCK | |
--check_version, --no-check_version, --no_check_version | |
comparing the GNES and proto version of incoming message with local setup, mismatch raise an exception Default: True | |
--identity | identity of the service, empty by default Default: “” |
--route_table, --no-route_table, --no_route_table | |
showing a route table with time cost after receiving the result Default: False | |
--squeeze_pb, --no-squeeze_pb, --no_squeeze_pb | |
sending bytes and ndarray separately apart from the protobuf message, usually yields better network efficiency Default: True | |
--ctrl_with_ipc | |
use ipc protocol for control socket Default: False | |
--grpc_host | host address of the grpc service Default: “0.0.0.0” |
--grpc_port | host port of the grpc service Default: 8800 |
--max_message_size | |
maximum send and receive size for grpc server in bytes, -1 means unlimited Default: -1 | |
--proxy, --no-proxy, --no_proxy | |
respect the http_proxy and https_proxy environment variables. otherwise, it will unset these proxy variables before start. gRPC seems to prefer –no_proxy Default: False | |
--max_concurrency | |
maximum concurrent connections allowed Default: 10 | |
--dump_route | dumping route information to a file |
--max_pending_request | |
maximum number of pending requests allowed, when exceed wait until we receive the response Default: 100 |
encode¶
start an encoder service
gnes encode [-h] [--port_in PORT_IN] [--port_out PORT_OUT] [--host_in HOST_IN]
[--host_out HOST_OUT]
[--socket_in {PULL_BIND,PULL_CONNECT,PUSH_BIND,PUSH_CONNECT,SUB_BIND,SUB_CONNECT,PUB_BIND,PUB_CONNECT,PAIR_BIND,PAIR_CONNECT}]
[--socket_out {PULL_BIND,PULL_CONNECT,PUSH_BIND,PUSH_CONNECT,SUB_BIND,SUB_CONNECT,PUB_BIND,PUB_CONNECT,PAIR_BIND,PAIR_CONNECT}]
[--port_ctrl PORT_CTRL] [--timeout TIMEOUT]
[--dump_interval DUMP_INTERVAL] [--read_only]
[--parallel_backend {thread,process}]
[--num_parallel NUM_PARALLEL]
[--parallel_type {PUSH_BLOCK,PUSH_NONBLOCK,PUB_BLOCK,PUB_NONBLOCK}]
[--check_version] [--identity IDENTITY] [--route_table]
[--squeeze_pb] [--ctrl_with_ipc] --yaml_path YAML_PATH
[--py_path PY_PATH [PY_PATH ...]]
Named Arguments¶
--port_in | port for input data, default a random port between [49152, 65536] Default: 65535 |
--port_out | port for output data, default a random port between [49152, 65536] Default: 54025 |
--host_in | host address for input Default: “0.0.0.0” |
--host_out | host address for output Default: “0.0.0.0” |
--socket_in | Possible choices: PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT, SUB_BIND, SUB_CONNECT, PUB_BIND, PUB_CONNECT, PAIR_BIND, PAIR_CONNECT socket type for input port Default: PULL_BIND |
--socket_out | Possible choices: PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT, SUB_BIND, SUB_CONNECT, PUB_BIND, PUB_CONNECT, PAIR_BIND, PAIR_CONNECT socket type for output port Default: PUSH_BIND |
--port_ctrl | port for controlling the service, default a random port between [49152, 65536] Default: 64235 |
--timeout | timeout (ms) of all communication, -1 for waiting forever Default: -1 |
--dump_interval | |
serialize the model in the service every n seconds if model changes. -1 means –read_only. Default: 5 | |
--read_only | do not allow the service to modify the model, dump_interval will be ignored Default: False |
--parallel_backend | |
Possible choices: thread, process parallel backend of the service Default: “thread” | |
--num_parallel, --replicas | |
number of parallel services running at the same time (i.e. replicas), port_in and port_out will be set to random, and routers will be added automatically when necessary Default: 1 | |
--parallel_type, --replica_type | |
Possible choices: PUSH_BLOCK, PUSH_NONBLOCK, PUB_BLOCK, PUB_NONBLOCK parallel type of the concurrent services Default: PUSH_NONBLOCK | |
--check_version, --no-check_version, --no_check_version | |
comparing the GNES and proto version of incoming message with local setup, mismatch raise an exception Default: True | |
--identity | identity of the service, empty by default Default: “” |
--route_table, --no-route_table, --no_route_table | |
showing a route table with time cost after receiving the result Default: False | |
--squeeze_pb, --no-squeeze_pb, --no_squeeze_pb | |
sending bytes and ndarray separately apart from the protobuf message, usually yields better network efficiency Default: True | |
--ctrl_with_ipc | |
use ipc protocol for control socket Default: False | |
--yaml_path | yaml config of the service, it should be a readable stream, or a valid file path, or a supported class name. |
--py_path | the file path(s) of an external python module(s). |
index¶
start an indexer service
gnes index [-h] [--port_in PORT_IN] [--port_out PORT_OUT] [--host_in HOST_IN]
[--host_out HOST_OUT]
[--socket_in {PULL_BIND,PULL_CONNECT,PUSH_BIND,PUSH_CONNECT,SUB_BIND,SUB_CONNECT,PUB_BIND,PUB_CONNECT,PAIR_BIND,PAIR_CONNECT}]
[--socket_out {PULL_BIND,PULL_CONNECT,PUSH_BIND,PUSH_CONNECT,SUB_BIND,SUB_CONNECT,PUB_BIND,PUB_CONNECT,PAIR_BIND,PAIR_CONNECT}]
[--port_ctrl PORT_CTRL] [--timeout TIMEOUT]
[--dump_interval DUMP_INTERVAL] [--read_only]
[--parallel_backend {thread,process}] [--num_parallel NUM_PARALLEL]
[--parallel_type {PUSH_BLOCK,PUSH_NONBLOCK,PUB_BLOCK,PUB_NONBLOCK}]
[--check_version] [--identity IDENTITY] [--route_table]
[--squeeze_pb] [--ctrl_with_ipc] --yaml_path YAML_PATH
[--py_path PY_PATH [PY_PATH ...]] [--sorted_response]
[--as_response AS_RESPONSE]
Named Arguments¶
--port_in | port for input data, default a random port between [49152, 65536] Default: 64047 |
--port_out | port for output data, default a random port between [49152, 65536] Default: 60180 |
--host_in | host address for input Default: “0.0.0.0” |
--host_out | host address for output Default: “0.0.0.0” |
--socket_in | Possible choices: PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT, SUB_BIND, SUB_CONNECT, PUB_BIND, PUB_CONNECT, PAIR_BIND, PAIR_CONNECT socket type for input port Default: PULL_BIND |
--socket_out | Possible choices: PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT, SUB_BIND, SUB_CONNECT, PUB_BIND, PUB_CONNECT, PAIR_BIND, PAIR_CONNECT socket type for output port Default: PUSH_BIND |
--port_ctrl | port for controlling the service, default a random port between [49152, 65536] Default: 52832 |
--timeout | timeout (ms) of all communication, -1 for waiting forever Default: -1 |
--dump_interval | |
serialize the model in the service every n seconds if model changes. -1 means –read_only. Default: 5 | |
--read_only | do not allow the service to modify the model, dump_interval will be ignored Default: False |
--parallel_backend | |
Possible choices: thread, process parallel backend of the service Default: “thread” | |
--num_parallel, --replicas | |
number of parallel services running at the same time (i.e. replicas), port_in and port_out will be set to random, and routers will be added automatically when necessary Default: 1 | |
--parallel_type, --replica_type | |
Possible choices: PUSH_BLOCK, PUSH_NONBLOCK, PUB_BLOCK, PUB_NONBLOCK parallel type of the concurrent services Default: PUSH_NONBLOCK | |
--check_version, --no-check_version, --no_check_version | |
comparing the GNES and proto version of incoming message with local setup, mismatch raise an exception Default: True | |
--identity | identity of the service, empty by default Default: “” |
--route_table, --no-route_table, --no_route_table | |
showing a route table with time cost after receiving the result Default: False | |
--squeeze_pb, --no-squeeze_pb, --no_squeeze_pb | |
sending bytes and ndarray separately apart from the protobuf message, usually yields better network efficiency Default: True | |
--ctrl_with_ipc | |
use ipc protocol for control socket Default: False | |
--yaml_path | yaml config of the service, it should be a readable stream, or a valid file path, or a supported class name. |
--py_path | the file path(s) of an external python module(s). |
--sorted_response | |
sort the response (if exist) by the score Default: False | |
--as_response | convert the message type from request to response after indexing. turn it off if you want to chain other services after this index service. Default: True |
route¶
start a router service
gnes route [-h] [--port_in PORT_IN] [--port_out PORT_OUT] [--host_in HOST_IN]
[--host_out HOST_OUT]
[--socket_in {PULL_BIND,PULL_CONNECT,PUSH_BIND,PUSH_CONNECT,SUB_BIND,SUB_CONNECT,PUB_BIND,PUB_CONNECT,PAIR_BIND,PAIR_CONNECT}]
[--socket_out {PULL_BIND,PULL_CONNECT,PUSH_BIND,PUSH_CONNECT,SUB_BIND,SUB_CONNECT,PUB_BIND,PUB_CONNECT,PAIR_BIND,PAIR_CONNECT}]
[--port_ctrl PORT_CTRL] [--timeout TIMEOUT]
[--dump_interval DUMP_INTERVAL] [--read_only]
[--parallel_backend {thread,process}] [--num_parallel NUM_PARALLEL]
[--parallel_type {PUSH_BLOCK,PUSH_NONBLOCK,PUB_BLOCK,PUB_NONBLOCK}]
[--check_version] [--identity IDENTITY] [--route_table]
[--squeeze_pb] [--ctrl_with_ipc] --yaml_path YAML_PATH
[--py_path PY_PATH [PY_PATH ...]] [--sorted_response]
[--num_part NUM_PART]
Named Arguments¶
--port_in | port for input data, default a random port between [49152, 65536] Default: 53508 |
--port_out | port for output data, default a random port between [49152, 65536] Default: 55440 |
--host_in | host address for input Default: “0.0.0.0” |
--host_out | host address for output Default: “0.0.0.0” |
--socket_in | Possible choices: PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT, SUB_BIND, SUB_CONNECT, PUB_BIND, PUB_CONNECT, PAIR_BIND, PAIR_CONNECT socket type for input port Default: PULL_BIND |
--socket_out | Possible choices: PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT, SUB_BIND, SUB_CONNECT, PUB_BIND, PUB_CONNECT, PAIR_BIND, PAIR_CONNECT socket type for output port Default: PUSH_BIND |
--port_ctrl | port for controlling the service, default a random port between [49152, 65536] Default: 53075 |
--timeout | timeout (ms) of all communication, -1 for waiting forever Default: -1 |
--dump_interval | |
serialize the model in the service every n seconds if model changes. -1 means –read_only. Default: 5 | |
--read_only | do not allow the service to modify the model, dump_interval will be ignored Default: True |
--parallel_backend | |
Possible choices: thread, process parallel backend of the service Default: “thread” | |
--num_parallel, --replicas | |
number of parallel services running at the same time (i.e. replicas), port_in and port_out will be set to random, and routers will be added automatically when necessary Default: 1 | |
--parallel_type, --replica_type | |
Possible choices: PUSH_BLOCK, PUSH_NONBLOCK, PUB_BLOCK, PUB_NONBLOCK parallel type of the concurrent services Default: PUSH_NONBLOCK | |
--check_version, --no-check_version, --no_check_version | |
comparing the GNES and proto version of incoming message with local setup, mismatch raise an exception Default: True | |
--identity | identity of the service, empty by default Default: “” |
--route_table, --no-route_table, --no_route_table | |
showing a route table with time cost after receiving the result Default: False | |
--squeeze_pb, --no-squeeze_pb, --no_squeeze_pb | |
sending bytes and ndarray separately apart from the protobuf message, usually yields better network efficiency Default: True | |
--ctrl_with_ipc | |
use ipc protocol for control socket Default: False | |
--yaml_path | yaml config of the service, it should be a readable stream, or a valid file path, or a supported class name. |
--py_path | the file path(s) of an external python module(s). |
--sorted_response | |
sort the response (if exist) by the score Default: False | |
--num_part | explicitly set the number of parts of message |
preprocess¶
start a preprocessor service
gnes preprocess [-h] [--port_in PORT_IN] [--port_out PORT_OUT]
[--host_in HOST_IN] [--host_out HOST_OUT]
[--socket_in {PULL_BIND,PULL_CONNECT,PUSH_BIND,PUSH_CONNECT,SUB_BIND,SUB_CONNECT,PUB_BIND,PUB_CONNECT,PAIR_BIND,PAIR_CONNECT}]
[--socket_out {PULL_BIND,PULL_CONNECT,PUSH_BIND,PUSH_CONNECT,SUB_BIND,SUB_CONNECT,PUB_BIND,PUB_CONNECT,PAIR_BIND,PAIR_CONNECT}]
[--port_ctrl PORT_CTRL] [--timeout TIMEOUT]
[--dump_interval DUMP_INTERVAL] [--read_only]
[--parallel_backend {thread,process}]
[--num_parallel NUM_PARALLEL]
[--parallel_type {PUSH_BLOCK,PUSH_NONBLOCK,PUB_BLOCK,PUB_NONBLOCK}]
[--check_version] [--identity IDENTITY] [--route_table]
[--squeeze_pb] [--ctrl_with_ipc] --yaml_path YAML_PATH
[--py_path PY_PATH [PY_PATH ...]]
Named Arguments¶
--port_in | port for input data, default a random port between [49152, 65536] Default: 50761 |
--port_out | port for output data, default a random port between [49152, 65536] Default: 62768 |
--host_in | host address for input Default: “0.0.0.0” |
--host_out | host address for output Default: “0.0.0.0” |
--socket_in | Possible choices: PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT, SUB_BIND, SUB_CONNECT, PUB_BIND, PUB_CONNECT, PAIR_BIND, PAIR_CONNECT socket type for input port Default: PULL_BIND |
--socket_out | Possible choices: PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT, SUB_BIND, SUB_CONNECT, PUB_BIND, PUB_CONNECT, PAIR_BIND, PAIR_CONNECT socket type for output port Default: PUSH_BIND |
--port_ctrl | port for controlling the service, default a random port between [49152, 65536] Default: 54246 |
--timeout | timeout (ms) of all communication, -1 for waiting forever Default: -1 |
--dump_interval | |
serialize the model in the service every n seconds if model changes. -1 means –read_only. Default: 5 | |
--read_only | do not allow the service to modify the model, dump_interval will be ignored Default: True |
--parallel_backend | |
Possible choices: thread, process parallel backend of the service Default: “thread” | |
--num_parallel, --replicas | |
number of parallel services running at the same time (i.e. replicas), port_in and port_out will be set to random, and routers will be added automatically when necessary Default: 1 | |
--parallel_type, --replica_type | |
Possible choices: PUSH_BLOCK, PUSH_NONBLOCK, PUB_BLOCK, PUB_NONBLOCK parallel type of the concurrent services Default: PUSH_NONBLOCK | |
--check_version, --no-check_version, --no_check_version | |
comparing the GNES and proto version of incoming message with local setup, mismatch raise an exception Default: True | |
--identity | identity of the service, empty by default Default: “” |
--route_table, --no-route_table, --no_route_table | |
showing a route table with time cost after receiving the result Default: False | |
--squeeze_pb, --no-squeeze_pb, --no_squeeze_pb | |
sending bytes and ndarray separately apart from the protobuf message, usually yields better network efficiency Default: True | |
--ctrl_with_ipc | |
use ipc protocol for control socket Default: False | |
--yaml_path | yaml config of the service, it should be a readable stream, or a valid file path, or a supported class name. |
--py_path | the file path(s) of an external python module(s). |
grpc¶
start a general purpose grpc service
gnes grpc [-h] [--port_in PORT_IN] [--port_out PORT_OUT] [--host_in HOST_IN]
[--host_out HOST_OUT]
[--socket_in {PULL_BIND,PULL_CONNECT,PUSH_BIND,PUSH_CONNECT,SUB_BIND,SUB_CONNECT,PUB_BIND,PUB_CONNECT,PAIR_BIND,PAIR_CONNECT}]
[--socket_out {PULL_BIND,PULL_CONNECT,PUSH_BIND,PUSH_CONNECT,SUB_BIND,SUB_CONNECT,PUB_BIND,PUB_CONNECT,PAIR_BIND,PAIR_CONNECT}]
[--port_ctrl PORT_CTRL] [--timeout TIMEOUT]
[--dump_interval DUMP_INTERVAL] [--read_only]
[--parallel_backend {thread,process}] [--num_parallel NUM_PARALLEL]
[--parallel_type {PUSH_BLOCK,PUSH_NONBLOCK,PUB_BLOCK,PUB_NONBLOCK}]
[--check_version] [--identity IDENTITY] [--route_table]
[--squeeze_pb] [--ctrl_with_ipc] [--grpc_host GRPC_HOST]
[--grpc_port GRPC_PORT] [--max_message_size MAX_MESSAGE_SIZE]
[--proxy] --pb2_path PB2_PATH --pb2_grpc_path PB2_GRPC_PATH
--stub_name STUB_NAME --api_name API_NAME
Named Arguments¶
--port_in | port for input data, default a random port between [49152, 65536] Default: 63835 |
--port_out | port for output data, default a random port between [49152, 65536] Default: 60594 |
--host_in | host address for input Default: “0.0.0.0” |
--host_out | host address for output Default: “0.0.0.0” |
--socket_in | Possible choices: PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT, SUB_BIND, SUB_CONNECT, PUB_BIND, PUB_CONNECT, PAIR_BIND, PAIR_CONNECT socket type for input port Default: PULL_BIND |
--socket_out | Possible choices: PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT, SUB_BIND, SUB_CONNECT, PUB_BIND, PUB_CONNECT, PAIR_BIND, PAIR_CONNECT socket type for output port Default: PUSH_BIND |
--port_ctrl | port for controlling the service, default a random port between [49152, 65536] Default: 53024 |
--timeout | timeout (ms) of all communication, -1 for waiting forever Default: -1 |
--dump_interval | |
serialize the model in the service every n seconds if model changes. -1 means –read_only. Default: 5 | |
--read_only | do not allow the service to modify the model, dump_interval will be ignored Default: False |
--parallel_backend | |
Possible choices: thread, process parallel backend of the service Default: “thread” | |
--num_parallel, --replicas | |
number of parallel services running at the same time (i.e. replicas), port_in and port_out will be set to random, and routers will be added automatically when necessary Default: 1 | |
--parallel_type, --replica_type | |
Possible choices: PUSH_BLOCK, PUSH_NONBLOCK, PUB_BLOCK, PUB_NONBLOCK parallel type of the concurrent services Default: PUSH_NONBLOCK | |
--check_version, --no-check_version, --no_check_version | |
comparing the GNES and proto version of incoming message with local setup, mismatch raise an exception Default: True | |
--identity | identity of the service, empty by default Default: “” |
--route_table, --no-route_table, --no_route_table | |
showing a route table with time cost after receiving the result Default: False | |
--squeeze_pb, --no-squeeze_pb, --no_squeeze_pb | |
sending bytes and ndarray separately apart from the protobuf message, usually yields better network efficiency Default: True | |
--ctrl_with_ipc | |
use ipc protocol for control socket Default: False | |
--grpc_host | host address of the grpc service Default: “0.0.0.0” |
--grpc_port | host port of the grpc service Default: 8800 |
--max_message_size | |
maximum send and receive size for grpc server in bytes, -1 means unlimited Default: -1 | |
--proxy, --no-proxy, --no_proxy | |
respect the http_proxy and https_proxy environment variables. otherwise, it will unset these proxy variables before start. gRPC seems to prefer –no_proxy Default: False | |
--pb2_path | the path of the python file protocol buffer compiler |
--pb2_grpc_path | |
the path of the python file generated by the gRPC Python protocol compiler plugin | |
--stub_name | the name of the gRPC Stub |
--api_name | the api name for calling the stub |
client¶
start a GNES client of the selected type
gnes client [-h] {cli} ...
GNES client sub-commands¶
use “gnes client [sub-command] –help” to get detailed information about each client sub-command
client | Possible choices: cli |
Sub-commands:¶
cli¶
start a client that allows stdin as input
gnes client cli [-h] [--grpc_host GRPC_HOST] [--grpc_port GRPC_PORT]
[--max_message_size MAX_MESSAGE_SIZE] [--proxy]
[--txt_file TXT_FILE | --image_zip_file IMAGE_ZIP_FILE | --video_zip_file VIDEO_ZIP_FILE]
[--batch_size BATCH_SIZE] --mode {index,query,train}
[--top_k TOP_K] [--start_doc_id START_DOC_ID]
[--max_concurrency MAX_CONCURRENCY] [--keep_envelope]
Named Arguments¶
--grpc_host | host address of the grpc service Default: “0.0.0.0” |
--grpc_port | host port of the grpc service Default: 8800 |
--max_message_size | |
maximum send and receive size for grpc server in bytes, -1 means unlimited Default: -1 | |
--proxy, --no-proxy, --no_proxy | |
respect the http_proxy and https_proxy environment variables. otherwise, it will unset these proxy variables before start. gRPC seems to prefer –no_proxy Default: False | |
--txt_file | text file to be used, each line is a doc/query Default: <_io.TextIOWrapper name=’<stdin>’ mode=’r’ encoding=’UTF-8’> |
--image_zip_file | |
image zip file to be used, consists of multiple images | |
--video_zip_file | |
video zip file to be used, consists of multiple videos | |
--batch_size | the size of the request to split Default: 100 |
--mode | Possible choices: index, query, train the mode of the client and the server |
--top_k | top_k results returned in the query mode Default: 10 |
--start_doc_id | the start number of doc id Default: 0 |
--max_concurrency | |
maximum concurrent connections allowed Default: 10 | |
--keep_envelope | |
keep the envelope (routing, timing information) after receiving the message Default: False |
healthcheck¶
do health check on any GNES microservice
gnes healthcheck [-h] [--host HOST] --port PORT [--timeout TIMEOUT]
[--retries RETRIES]
Named Arguments¶
--host | host address of the checked service Default: “127.0.0.1” |
--port | control port of the checked service |
--timeout | timeout (ms) of one check, -1 for waiting forever Default: 1000 |
--retries | max number of tried health checks before exit 1 Default: 3 |