chainer / chainerui

ChainerUI: User Interface for Chainer
MIT License
170 stars 30 forks source link

Change log data structure in frontend #277

Closed gky360 closed 5 years ago

gky360 commented 5 years ago

Improved frontend performance by changing the data structure of logs.

In the future, another PR will change the data structure of logs on the server side. Afterward, logTransformMiddleware added temporarily in this PR can be removed because the server side returns logs with the new structure and data structure transformation in frontend will no longer be needed.

before

{
  "id": 60341,
  "logItems": [
    {
      "key": "epoch",
      "logId": 60341,
      "value": 232
    },
    ...,
    {
      "key": "validation/main/ap/train",
      "logId": 60341,
      "value": 0.8742285132142299
    }
  ],
  "resultId": 21
}

Screen Shot 2019-05-29 at 23 47 41

after

{
  "id": 60341,
  "resultId": 21,
  "logDict": {
    "epoch": 232,
    "lr": 0.000010000000000000003,
    "elapsed_time": 116463.71140658506,
    ...,
    "other1/loss/conf": 1.3967612981796265,
    "validation/main/ap/train": 0.8742285132142299
  }
}

Screen Shot 2019-05-29 at 23 54 22

ofk commented 5 years ago

Thank you!