Deploy async functions on Beam
Beam.Types
module.
Name | Type | Description |
---|---|---|
inputs | dict | A dictionary specifying the interface for the API |
handler | string | The function that will be run when the API is invoked |
Type | Description |
---|---|
beam.types.Json() | A JSON object |
beam.types.String(max_length=None) | A string field, with an optional max_length parameter |
beam.types.Float() | Standard floating point value |
beam.types.Boolean() | Standard boolean value |
beam.types.Tensor(shape=None, dtype=None) | A torch tensor object, with optional shape and dtype parameters |
beam.types.Dataframe() | A pandas dataframe object |
beam.types.NumpyArray(shape=None, dtype=None) | A numpy array, with optional shape and dtype parameters |
beam.types.Binary() | A binary object, for example a video file or anything that doesn’t fit into the other types listed |
beam.types.Image(raw=False) | A generic image, automatically serialized into a PIL object for use in the handler |
required=false
beam.types.Boolean(required=false)
beam.types.Dataframe(required=false)