Skip to main content

Post-Processor

In the Docker Model Runner framework, Dais will notify the Post-Processor service when Docker Models have completed their runs.

The notification is sent in the form of a HTTP POST request to its base url. Using the example setup in configuration, the request will be sent to http://post-processor:8080. The accompanying JSON object that is sent has details of each model run which the post-processor is expected to process and response. The response is expected to be in JSON format and will be saved to the Model Outputs data store.

The JSON object that is sent to post-processor service has for each model run information on:

  • what seed number was used
  • where to collect the model run results
  • what outcome, success or failure, was produced
  • what input JSON was used (irrelevant to configuration without a Pre-Processor)

Docker Model with a Post-Processor

Below is an example JSON object that is sent to the Post-Processor service the the configuration is setup without a Pre-Processor.

{
"results": [
{"seed": 1, "url": "http://fm:8000/results/x/1.zip"},
{"seed": 2, "url": "http://fm:8000/results/x/2.zip"}
],
"submissionInfo": {
"seedinfo": {
"0": {"1": {"success": "ok"}, "2": {"failure": "'Task failed'"}}
}
}
}

Docker Model with a Pre- and a Post-Processor

Here is another example JSON object but the configuration is setup with a Pre-Processor service.

{
"results": [
{"doeSeed": 1, "seed": 1, "url": "http://fm:8000/results/x/1_1.zip"},
{"doeSeed": 1, "seed": 2, "url": "http://fm:8000/results/x/1_2.zip"},
{"doeSeed": 2, "seed": 1, "url": "http://fm:8000/results/x/2_1.zip"},
{"doeSeed": 2, "seed": 2, "url": "http://fm:8000/results/x/2_2.zip"},
{"doeSeed": 3, "seed": 1, "url": "http://fm:8000/results/x/3_1.zip"},
{"doeSeed": 3, "seed": 2, "url": "http://fm:8000/results/x/3_2.zip"}
],
"submissionInfo": {
"seedinfo": {
"1": {"1": {"success": "ok"}, "2": {"failure": "'Task failed'"}},
"2": {"1": {"success": "ok"}, "2": {"success": "ok"}},
"3": {"1": {"success": "ok"}, "2": {"success": "ok"}}
}
},
"inputSets": [
{"doeSeed": 1, "url": "http://fm:8000/cases/x/1.json"},
{"doeSeed": 2, "url": "http://fm:8000/cases/x/2.json"},
{"doeSeed": 3, "url": "http://fm:8000/cases/x/3.json"}
]
}