Example #1
0
 socket.on('data-train-begin', function (data) {
     store.dispatch(
         updateData({
             [data.model.id]: {
                 $set: Update(
                     data,
                     defaultModelFieldsUpdater
                 )
             }
         }
     ));
 });
Example #2
0
 socket.on('data-batch-end', function (data) {
     store.dispatch(
         updateData({
             [data.model.id]: {
                 logs: {
                     $push: [data.logs]
                 },
                 metricTimeseries: metricsToMonitor.reduce((map, metricName) => {
                     map[metricName] = {
                         $push: [
                             [data.logs.batch, data.logs[metricName]]
                         ]
                     };
                     return map;
                 }, {})
             }
         }
     ));
 });