• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vanvalenlab / deepcell-label / 4578689396

pending completion
4578689396

Pull #436

github

GitHub
Merge ddb425c30 into 6a993cb7a
Pull Request #436: Model training overhaul: SNGP model, uncertainty visualization, and custom embedding support

462 of 1163 branches covered (39.72%)

Branch coverage included in aggregate %.

20 of 628 new or added lines in 27 files covered. (3.18%)

76 existing lines in 5 files now uncovered.

3248 of 5431 relevant lines covered (59.8%)

543.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/frontend/src/Project/EditControls/CellTypeControls/TrainingUI/TrainingPlot.js
1
import Grid from '@mui/material/Grid';
2
import { useSelector } from '@xstate/react';
3
import equal from 'fast-deep-equal';
4
import Plot from 'react-plotly.js';
5
import { useTraining } from '../../../ProjectContext';
6

7
function TrainingPlot() {
8
  const training = useTraining();
×
9
  const trainLogs = useSelector(training, (state) => state.context.trainLogs, equal);
×
10
  const valLogs = useSelector(training, (state) => state.context.valLogs, equal);
×
11
  const epochs = trainLogs.map((_, i) => i);
×
12

NEW
13
  const width = window.innerWidth * 0.4;
×
NEW
14
  const height = window.innerHeight * 0.62;
×
15

UNCOV
16
  return (
×
17
    <Grid item>
18
      <Plot
19
        data={[
20
          {
21
            x: epochs,
22
            y: valLogs,
23
            mode: 'lines',
24
            name: 'Validation',
25
            line: {
26
              color: 'rgba(0, 166, 255, 1)',
27
            },
28
          },
29
          {
30
            x: epochs,
31
            y: trainLogs,
32
            mode: 'lines',
33
            name: 'Training',
34
            line: {
35
              color: 'rgba(0, 255, 166, 1)',
36
            },
37
          },
38
        ]}
39
        layout={{
40
          width: width,
41
          height: height,
42
          margin: { l: 30, r: 20, b: 30, t: 20, pad: 5 },
43
          xaxis: { range: [0, epochs.length], automargin: true, title: 'Epoch' },
44
          yaxis: {
45
            range: [0, Math.max(Math.max(...trainLogs), Math.max(...valLogs)) * 1.1],
46
            automargin: true,
47
            title: 'Softmax Loss',
48
          },
49
          legend: {
50
            xanchor: 'right',
51
          },
52
        }}
53
        config={{
54
          displaylogo: false,
55
          modeBarButtonsToRemove: ['autoScale2d', 'zoomIn2d', 'zoomOut2d'],
56
          toImageButtonOptions: {
57
            format: 'svg',
58
          },
59
        }}
60
      />
61
    </Grid>
62
  );
63
}
64

65
export default TrainingPlot;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc