Skip to content

Oms API GET job history state

amc1999 edited this page Sep 14, 2022 · 5 revisions

GET state of model run job from history.

This method allow get a history of model run job, results include:

  • model run request options, for example: run name, number of sub-values (sub-samples);
  • model run status (success or error) and sub-values progress information;
  • model run log content.

This is a beta version and may change in the future.

Method:

GET /api/service/job/history/:job

Arguments:

:job - (required) model run submission time stamp

Call examples:

http://localhost:4040/api/service/job/history/2022_09_13_21_28_38_409

Example:

{
  "JobStatus": "success",
  "SubmitStamp": "2022_09_13_21_28_38_409",
  "Pid": 0,
  "CmdPath": "",
  "ModelName": "RiskPaths",
  "ModelDigest": "d90e1e9a49a06d972ecf1d50e684c62b",
  "RunStamp": "2022_09_13_21_30_27_952",
  "Dir": "",
  "Opts": {
    "EN.RunDescription": "Run desription in English",
    "FR.RunDescription": "Run desription in French",
    "OpenM.BaseRunDigest": "66646f985fecfb1d59fd5ff81ee3b78a",
    "OpenM.LogRank": "true",
    "OpenM.MessageLanguage": "en-CA",
    "OpenM.NotOnRoot": "true",
    "OpenM.RunName": "RiskPaths New 4 sub-values",
    "OpenM.SetName": "New_2022",
    "OpenM.SubValues": "4",
    "OpenM.Threads": "2"
  },
  "Env": {},
  "Threads": 2,
  "IsMpi": true,
  "Mpi": {
    "Np": 2,
    "IsNotOnRoot": true,
    "IsNotByJob": true
  },
  "Template": "mpi.ModelRun.template.txt",
  "Tables": [
    "T02_TotalPopulationByYear",
    "TG03_Union_Tables",
    "TG02_Birth_Tables"
  ],
  "RunNotes": [
    {
      "LangCode": "EN",
      "Note": "Run notes (English)"
    },
    {
      "LangCode": "FR",
      "Note": "Run notes (French)"
    }
  ],
  "Res": {
    "Cpu": 2,
    "Mem": 0
  },
  "IsOverLimit": false,
  "QueuePos": 0,
  "LogFileName": "RiskPaths.2022_09_13_21_30_27_952.console.log",
  "LogPath": "",
  "RunStatus": [
    {
      "ModelName": "RiskPaths",
      "ModelDigest": "d90e1e9a49a06d972ecf1d50e684c62b",
      "ModelVersion": "3.0.0.0",
      "ModelCreateDateTime": "2022-08-27 04:44:36.215",
      "Name": "RiskPaths New 4 sub-values",
      "SubCount": 4,
      "SubStarted": 4,
      "SubCompleted": 4,
      "CreateDateTime": "2022-09-13 21:30:28.188",
      "Status": "s",
      "UpdateDateTime": "2022-09-13 21:35:37.090",
      "RunDigest": "6d697389e6ca0d55b6615e02c1e453f6",
      "ValueDigest": "eabadea9394ae40012fe8b70d303966e",
      "RunStamp": "2022_09_13_21_30_27_952",
      "Txt": [],
      "Opts": {},
      "Param": [],
      "Table": [],
      "Progress": [
        {
          "SubId": 0,
          "CreateDateTime": "2022-09-13 21:30:28.000",
          "Status": "s",
          "UpdateDateTime": "2022-09-13 21:33:11.000",
          "Count": 100,
          "Value": 3086250
        },
        {
          "SubId": 1,
          "CreateDateTime": "2022-09-13 21:30:28.000",
          "Status": "s",
          "UpdateDateTime": "2022-09-13 21:32:54.000",
          "Count": 100,
          "Value": 3086250
        },
        {
          "SubId": 2,
          "CreateDateTime": "2022-09-13 21:32:54.000",
          "Status": "s",
          "UpdateDateTime": "2022-09-13 21:35:18.000",
          "Count": 100,
          "Value": 3086250
        },
        {
          "SubId": 3,
          "CreateDateTime": "2022-09-13 21:33:11.000",
          "Status": "s",
          "UpdateDateTime": "2022-09-13 21:35:36.000",
          "Count": 100,
          "Value": 3086250
        }
      ]
    }
  ],
  "Lines": [
    "2022-09-13 21:30:28.010 RiskPaths",
    "2022-09-13 21:30:28.010 RiskPaths",
    "2022-09-13 21:30:28.030 [0] Reading C:\\go-ompp\\models\\log\\2022_09_13_21_30_27_952.run_notes.EN.md",
    "2022-09-13 21:30:28.030 [0] Reading C:\\go-ompp\\models\\log\\2022_09_13_21_30_27_952.run_notes.FR.md",
    "2022-09-13 21:30:28.101 [0] Model version  : 3.0.0.0",
    "2022-09-13 21:30:28.101 [0] Model created  : 2022-08-27 04:44:36.215",
    "2022-09-13 21:30:28.101 [0] Model digest   : d90e1e9a49a06d972ecf1d50e684c62b",
    "2022-09-13 21:30:28.101 [0] OpenM++ version: 2022-05-05 003df091e5b05b7208562c626e7dd72b4dd5055e v1.9.9",
    "2022-09-13 21:30:28.101 [0] OpenM++ build  : Windows 64 bit Release MPI",
    "2022-09-13 21:30:28.101 [0] Parallel run of 2 modeling processes, 2 thread(s) each",
    "2022-09-13 21:30:28.101 [0] OM_ROOT=C:\\go-ompp",
    "2022-09-13 21:30:28.101 [0] Model build    : Windows 64 bit Release",
    "2022-09-13 21:30:28.101 [0] Prepare fixed and missing parameters",
    "2022-09-13 21:30:28.102 [0] Run: 2022_09_13_21_30_27_952",
    "2022-09-13 21:30:28.116 [1] Model version  : 3.0.0.0",
    "2022-09-13 21:30:28.116 [1] Model created  : 2022-08-27 04:44:36.215",
    "2022-09-13 21:30:28.116 [1] Model digest   : d90e1e9a49a06d972ecf1d50e684c62b",
    "2022-09-13 21:30:28.116 [1] OpenM++ version: 2022-05-05 003df091e5b05b7208562c626e7dd72b4dd5055e v1.9.9",
    "2022-09-13 21:30:28.116 [1] OpenM++ build  : Windows 64 bit Release MPI",
    "2022-09-13 21:30:28.116 [1] OM_ROOT=C:\\go-ompp",
    "2022-09-13 21:30:28.117 [1] Model build    : Windows 64 bit Release",
    "2022-09-13 21:30:28.117 [1] Prepare fixed and missing parameters",
    "2022-09-13 21:30:28.117 [1] Run: 2022_09_13_21_30_27_952",
    "2022-09-13 21:30:28.219 [1] Run: 142 RiskPaths New 4 sub-values",
    "2022-09-13 21:30:28.219 [1] Get scenario parameters for process",
    "2022-09-13 21:30:28.220 [1] member=0 Bind scenario parameters",
    "2022-09-13 21:30:28.220 [1] member=0 Compute derived parameters",
    "2022-09-13 21:30:28.220 [1] member=1 Bind scenario parameters",
    "2022-09-13 21:30:28.221 [1] member=1 Compute derived parameters",
    "2022-09-13 21:30:28.221 [1] member=1 Prepare for simulation",
    "2022-09-13 21:30:28.221 [1] member=1 Simulation progress=0% cases=0",
    "2022-09-13 21:30:28.222 [1] member=0 Prepare for simulation",
    "2022-09-13 21:30:28.222 [1] member=0 Simulation progress=0% cases=0",
    ......................
    ........ skip ........
    ......................
    "2022-09-13 21:35:37.058 [0] Writing into aggregated output tables, run: 142",
    "2022-09-13 21:35:37.090 [0] Digest output tables, run: 142",
    "2022-09-13 21:35:38.251 [0] Done.",
    "2022-09-13 21:35:38.251 [1] Done."
  ]
}

Example: empty response if model run job not found on server

{
  "JobStatus": "",
  "SubmitStamp": "2022_07_05_19_55_38_626",
  "Pid": 0,
  "CmdPath": "",
  "ModelName": "",
  "ModelDigest": "",
  "RunStamp": "",
  "Dir": "",
  "Opts": {},
  "Env": {},
  "Threads": 0,
  "IsMpi": false,
  "Mpi": {
    "Np": 0,
    "IsNotOnRoot": false,
    "IsNotByJob": false
  },
  "Template": "",
  "Tables": [],
  "RunNotes": [],
  "Res": {
    "Cpu": 0,
    "Mem": 0
  },
  "IsOverLimit": false,
  "QueuePos": 0,
  "LogFileName": "",
  "LogPath": "",
  "RunStatus": [],
  "Lines": []
}

Home

Getting Started

Model development in OpenM++

Using OpenM++

Model Development Topics

OpenM++ web-service: API and cloud setup

Using OpenM++ from Python and R

Docker

OpenM++ Development

OpenM++ Design, Roadmap and Status

OpenM++ web-service API

GET Model Metadata

GET Model Extras

GET Model Run results metadata

GET Model Workset metadata: set of input parameters

Read Parameters, Output Tables or Microdata values

GET Parameters, Output Tables or Microdata values

GET Parameters, Output Tables or Microdata as CSV

GET Modeling Task metadata and task run history

Update Model Profile: set of key-value options

Update Model Workset: set of input parameters

Update Model Runs

Update Modeling Tasks

Run Models: run models and monitor progress

Download model, model run results or input parameters

Upload model runs or worksets (input scenarios)

Download and upload user files

User: manage user settings

Model run jobs and service state

Administrative: manage web-service state

Clone this wiki locally