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

vanvalenlab / deepcell-label / 4494173115

pending completion
4494173115

Pull #436

github

GitHub
Merge 4bfd476be into d83615b3c
Pull Request #436: Model training overhaul: SNGP model, uncertainty visualization, and custom embedding support

450 of 1157 branches covered (38.89%)

Branch coverage included in aggregate %.

14 of 619 new or added lines in 23 files covered. (2.26%)

81 existing lines in 8 files now uncovered.

3189 of 5394 relevant lines covered (59.12%)

525.09 hits per line

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

0.0
/frontend/src/Project/EditControls/CellTypeControls/TrainingUI/TrainingButtons.js
1
import InsightsIcon from '@mui/icons-material/Insights';
2
import MiscellaneousServicesIcon from '@mui/icons-material/MiscellaneousServices';
3
import { Button } from '@mui/material';
4
import Grid from '@mui/material/Grid';
5
import { useSelector } from '@xstate/react';
6
import { useState } from 'react';
7
import { useTraining } from '../../../ProjectContext';
8
import PredictionModal from './PredictionModal';
9
import VisualizationModal from './VisualizationModal';
10

11
function TrainingButtons() {
12
  const training = useTraining();
×
13
  const model = useSelector(training, (state) => state.context.model);
×
NEW
14
  const [trainOpen, setTrainOpen] = useState(false);
×
NEW
15
  const [predOpen, setPredOpen] = useState(false);
×
16

NEW
17
  const handleTrainModal = () => {
×
NEW
18
    setTrainOpen(true);
×
19
  };
20

NEW
21
  const handlePredictModal = () => {
×
NEW
22
    setPredOpen(true);
×
23
  };
24

25
  return (
×
26
    <>
27
      <Grid item display='flex'>
28
        <Button
29
          sx={{
30
            width: '47%',
31
            backgroundColor: 'rgba(245, 20, 87, 1)',
32
            '&:hover': { backgroundColor: 'rgba(224, 0, 67, 1)' },
33
          }}
34
          variant='contained'
35
          onClick={handleTrainModal}
36
          startIcon={<MiscellaneousServicesIcon />}
37
        >
38
          Train
39
        </Button>
40
        <Button
41
          disabled={model ? false : true}
×
42
          sx={{
43
            marginLeft: '3%',
44
            width: '47%',
45
            backgroundColor: 'rgba(20, 200, 83, 1)',
46
            '&:hover': { backgroundColor: 'rgba(0, 180, 63, 1)' },
47
          }}
48
          variant='contained'
49
          onClick={handlePredictModal}
50
          startIcon={<InsightsIcon />}
51
        >
52
          Predict
53
        </Button>
54
      </Grid>
55
      <VisualizationModal open={trainOpen} setOpen={setTrainOpen} />
56
      <PredictionModal open={predOpen} setOpen={setPredOpen} />
57
    </>
58
  );
59
}
60

61
export default TrainingButtons;
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