Pipeline Methods

The pipeline methods are the blocks that construct the end-user request flow
_images/request_flow.png

API request flow through the four functions

load_model

pipeline.load_model()

Load model and its assets to memory

Returns

Model, will be used by the predict and process functions

verify_input

pipeline.verify_input(json_data)

Verifies the validity of an API request content

Parameters

json_data (dict) – Parsed JSON accepted from API call

Returns

Data for the the process function

process

pipeline.process(model, json_data)

Process the json_data passed from verify_input to model ready data

Parameters
  • model – Loaded object from load_model function

  • json_data – Data from the verify_input function

Returns

Model ready data

predict

pipeline.predict(model, data)

Predicts and prepares the answer for the API-caller

Parameters
  • model – Loaded object from load_model function

  • data – Data from process function

Returns

Response to API-caller

Return type

dict