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=49470, port_in=55964, port_out=59058, 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=54117, port_in=52785, port_out=49723, 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=61689, port_in=55963, port_out=57846, 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=49881, port_in=58911, port_out=64760, 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=49461, port_in=63080, port_out=52810, 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