gnes.composer.base module¶
-
class
gnes.composer.base.
YamlComposer
(args)[source]¶ Bases:
object
-
class
Layer
(layer_id=0)[source]¶ Bases:
object
-
default_values
= {'image': None, 'income': 'pull', 'name': None, 'py_path': None, 'replicas': 1, 'yaml_path': None}¶
-
get_component_name
¶
-
is_heto_single_component
¶
-
is_homo_multi_component
¶
-
is_homogenous
¶
-
is_single_component
¶
-
-
static
build_dockerswarm
(all_layers, docker_img='gnes/gnes:latest-alpine', volumes=None, networks=None)[source]¶ Return type: str
-
comp2args
= {'Encoder': Namespace(check_version=True, ctrl_with_ipc=False, dump_interval=5, host_in='0.0.0.0', host_out='0.0.0.0', identity='', num_parallel=1, parallel_backend='thread', parallel_type=<ParallelType.PUSH_NONBLOCK: 1>, port_ctrl=53492, port_in=56540, port_out=54693, py_path=None, read_only=False, route_table=False, socket_in=<SocketType.PULL_BIND: 0>, socket_out=<SocketType.PUSH_BIND: 2>, squeeze_pb=True, timeout=-1, verbose=False, yaml_path=<_io.StringIO object>), 'Frontend': Namespace(check_version=True, ctrl_with_ipc=False, dump_interval=5, dump_route=None, grpc_host='0.0.0.0', grpc_port=8800, host_in='0.0.0.0', host_out='0.0.0.0', identity='', max_concurrency=10, max_message_size=-1, max_pending_request=100, num_parallel=1, parallel_backend='thread', parallel_type=<ParallelType.PUSH_NONBLOCK: 1>, port_ctrl=49531, port_in=61494, port_out=61772, proxy=False, read_only=True, route_table=False, socket_in=<SocketType.PULL_BIND: 0>, socket_out=<SocketType.PUSH_BIND: 2>, squeeze_pb=True, timeout=-1, verbose=False), 'Indexer': Namespace(as_response=True, check_version=True, ctrl_with_ipc=False, dump_interval=5, host_in='0.0.0.0', host_out='0.0.0.0', identity='', num_parallel=1, parallel_backend='thread', parallel_type=<ParallelType.PUSH_NONBLOCK: 1>, port_ctrl=53315, port_in=55450, port_out=51646, py_path=None, read_only=False, route_table=False, socket_in=<SocketType.PULL_BIND: 0>, socket_out=<SocketType.PUSH_BIND: 2>, sorted_response=False, squeeze_pb=True, timeout=-1, verbose=False, yaml_path=<_io.StringIO object>), 'Preprocessor': Namespace(check_version=True, ctrl_with_ipc=False, dump_interval=5, host_in='0.0.0.0', host_out='0.0.0.0', identity='', num_parallel=1, parallel_backend='thread', parallel_type=<ParallelType.PUSH_NONBLOCK: 1>, port_ctrl=53268, port_in=54433, port_out=63965, py_path=None, read_only=True, route_table=False, socket_in=<SocketType.PULL_BIND: 0>, socket_out=<SocketType.PUSH_BIND: 2>, squeeze_pb=True, timeout=-1, verbose=False, yaml_path=<_io.StringIO object>), 'Router': Namespace(check_version=True, ctrl_with_ipc=False, dump_interval=5, host_in='0.0.0.0', host_out='0.0.0.0', identity='', num_parallel=1, num_part=None, parallel_backend='thread', parallel_type=<ParallelType.PUSH_NONBLOCK: 1>, port_ctrl=63613, port_in=61973, port_out=58949, py_path=None, read_only=True, route_table=False, socket_in=<SocketType.PULL_BIND: 0>, socket_out=<SocketType.PUSH_BIND: 2>, sorted_response=False, squeeze_pb=True, timeout=-1, verbose=False, yaml_path=<_io.StringIO object>)}¶
-
comp2file
= {'Encoder': 'encode', 'Frontend': 'frontend', 'Indexer': 'index', 'Preprocessor': 'preprocess', 'Router': 'route'}¶
-
class