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#

class beamds.beam.serve.client.BeamClient(*args, _store_init_path=None, _save_init_args=True, **kwargs)[source]#

Bases: BeamBase, BeamResource

property attributes#
property backwards_compatible#
classmethod client(*args, **kwargs)[source]#
property dump_function#
get(path)[source]#
get_info()[source]#
getattr(item)[source]#
property load_function#
post(path, *args, **kwargs)[source]#
property serialization#
to_function()[source]#
property type#

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#

class beamds.beam.serve.http_client.HTTPClient(*args, _store_init_path=None, _save_init_args=True, **kwargs)[source]#

Bases: BeamClient

get(path, **kwargs)[source]#
get_info()[source]#

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.remote.beam_server(obj, protocol='http', host=None, port=None, backend=None, non_blocking=False, **kwargs)[source]#
beamds.beam.serve.remote.triton_client(uri, hostname=None, port=None, model_name=None, model_version=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

batched_query_algorithm(method, args, kwargs)[source]#
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]#
call(client, *args, **kwargs)[source]#
get_info()[source]#
get_variable(client, name)[source]#
property metadata#
query_algorithm(client, method, args, kwargs, return_raw_results=False)[source]#
property request_queue#
property response_queue#
run(non_blocking=False, **kwargs)[source]#
run_non_blocking(**kwargs)[source]#
run_thread(host=None, port=None, **kwargs)[source]#
set_variable(client, name, value, *args, **kwargs)[source]#

beamds.beam.serve.triton module#

class beamds.beam.serve.triton.TritonClient(*args, _store_init_path=None, _save_init_args=True, **kwargs)[source]#

Bases: Processor

call_model(*args, model_name=None, model_version=None)[source]#
property client[source]#
get_metadata(model_name=None, model_version=None)[source]#
getattr(item)[source]#
property infer_input[source]#
property infer_requested_output[source]#
property is_alive#
property metadata[source]#

Module contents#