Table Of Contents
Table Of Contents

gluonts.shell.serve module

class gluonts.shell.serve.Application(app, config)[source]

Bases: gunicorn.app.base.BaseApplication

init(parser, opts, args)[source]
load() → flask.app.Flask[source]
load_config() → None[source]

This method is used to load the configuration from one or several input(s). Custom Command line, configuration file. You have to override this method in your class.

stop(*args, **kwargs)[source]
class gluonts.shell.serve.InferenceRequest[source]

Bases: pydantic.main.BaseModel

class gluonts.shell.serve.ServerFacade(base_address: str)[source]

Bases: object

A convenience wrapper for sending requests and handling responses to an inference server located at the given address.

execution_parameters() → dict[source]
invocations(data_entries: Iterable[Dict[str, Any]], configuration: dict) → List[dict][source]
ping() → bool[source]
url(path) → str[source]
class gluonts.shell.serve.Settings[source]

Bases: pydantic.env_settings.BaseSettings

class Config[source]

Bases: object

env_prefix = ''
number_of_workers
sagemaker_server_bind
class gluonts.shell.serve.ThrougputIter(iterable)[source]

Bases: object

gluonts.shell.serve.jsonify_floats(json_object)[source]

Traverses through the JSON object and converts non JSON-spec compliant floats(nan, -inf, inf) to their string representations.

Parameters:json_object – JSON object
gluonts.shell.serve.log_throughput(instances, timings)[source]
gluonts.shell.serve.make_flask_app(predictor_factory, execution_params) → flask.app.Flask[source]
gluonts.shell.serve.make_gunicorn_app(env: Optional[gluonts.shell.sagemaker.ServeEnv], forecaster_type: Optional[Type[Union[gluonts.model.estimator.Estimator, gluonts.model.predictor.Predictor]]], settings: gluonts.shell.serve.Settings) → gluonts.shell.serve.Application[source]