beamds.beam.serve package#
Submodules#
beamds.beam.serve.beam_grpc_pb2 module#
beamds.beam.serve.beam_grpc_pb2_grpc module#
beamds.beam.serve.client module#
beamds.beam.serve.config module#
- class beamds.beam.serve.config.BeamServeConfig(*args, _store_init_path=None, _save_init_args=True, **kwargs)[source]#
Bases:
BeamConfig
- defaults = {}#
- parameters = [BeamParam(name='protocol', type=<class 'str'>, default='http', help='The serving protocol [http|grpc]', tags=None), BeamParam(name='http-backend', type=<class 'str'>, default='waitress', help='The HTTP server backend', tags=None), BeamParam(name='path-to-bundle', type=<class 'str'>, default='/app/algorithm', help='Where the algorithm bundle is stored', tags=None), BeamParam(name='path-to-state', type=<class 'str'>, default=None, help='Where the state is stored (has precedence over path-to-bundle)', tags=None), BeamParam(name='port', type=<class 'int'>, default=None, help='Default port number (set None to choose automatically)', tags=None), BeamParam(name='n-threads', type=<class 'int'>, default=4, help='parallel threads', tags=None), BeamParam(name='use-torch', type=<class 'bool'>, default=False, help='Whether to use torch for pickling/unpickling', tags=None), BeamParam(name='batch', type=<class 'str'>, default=None, help='A function to parallelize with batching', tags=None), BeamParam(name='tls', type=<class 'bool'>, default=False, help='Whether to use tls encryption', tags=None), BeamParam(name='max-batch-size', type=<class 'int'>, default=10, help='Maximal batch size (execute function when reaching this number)', tags=None), BeamParam(name='max-wait-time', type=<class 'float'>, default=1.0, help='execute function if reaching this timeout', tags=None), BeamParam(name='non-blocking', type=<class 'bool'>, default=False, help='Run the server in a non-blocking mode', tags=None), BeamParam(name='load-kwargs', type=<class 'dict'>, default={}, help='Additional kwargs to pass to the load function', tags=None)]#
beamds.beam.serve.grpc_client module#
beamds.beam.serve.grpc_server module#
beamds.beam.serve.http_client module#
beamds.beam.serve.http_server module#
beamds.beam.serve.remote module#
- beamds.beam.serve.remote.beam_client(uri, hostname=None, port=None, username=None, api_key=None, **kwargs)[source]#
beamds.beam.serve.server module#
- class beamds.beam.serve.server.BeamServer(*args, _store_init_path=None, _save_init_args=True, **kwargs)[source]#
Bases:
MetaDispatcher
- classmethod build_algorithm_from_path(path, alg, override_hparams=None, dataset=None, alg_args=None, alg_kwargs=None, dataset_args=None, dataset_kwargs=None, **argv)[source]#
- property metadata#
- property request_queue#
- property response_queue#