def to_proto(self):
        msg = super().to_proto()
        task = self.task.to_proto()
        scenes = list(map(lambda s: s.to_proto(), self.scenes))
        analyzers = list(map(lambda a: a.to_proto(), self.analyzers))

        msg.MergeFrom(
            CommandConfigMsg(analyze_config=CommandConfigMsg.AnalyzeConfig(
                task=task, scenes=scenes, analyzers=analyzers)))

        return msg
Ejemplo n.º 2
0
    def to_proto(self):
        msg = super().to_proto()
        task = self.task.to_proto()
        scenes = list(map(lambda s: s.to_proto(), self.scenes))
        evaluators = list(map(lambda e: e.to_proto(), self.evaluators))

        msg.MergeFrom(
            CommandConfigMsg(eval_config=CommandConfigMsg.EvalConfig(
                task=task, scenes=scenes, evaluators=evaluators)))

        return msg
Ejemplo n.º 3
0
    def to_proto(self):
        msg = super().to_proto()

        task = self.task.to_proto()
        backend = self.backend.to_proto()
        scenes = list(map(lambda s: s.to_proto(), self.scenes))

        msg.MergeFrom(
            CommandConfigMsg(predict_config=CommandConfigMsg.PredictConfig(
                task=task, backend=backend, scenes=scenes)))

        return msg
Ejemplo n.º 4
0
    def to_proto(self):
        msg = super().to_proto()

        task = self.task.to_proto()
        backend = self.backend.to_proto()

        msg.MergeFrom(
            CommandConfigMsg(
                train_config=CommandConfigMsg.TrainConfig(
                    task=task, backend=backend)))

        return msg
Ejemplo n.º 5
0
    def to_proto(self):
        msg = super().to_proto()

        task = self.task.to_proto()
        backend = self.backend.to_proto()
        train_scenes = list(map(lambda s: s.to_proto(), self.train_scenes))
        val_scenes = list(map(lambda s: s.to_proto(), self.val_scenes))
        msg.MergeFrom(
            CommandConfigMsg(chip_config=CommandConfigMsg.ChipConfig(
                task=task,
                backend=backend,
                train_scenes=train_scenes,
                val_scenes=val_scenes)))

        return msg
    def to_proto(self):
        msg = super().to_proto()

        task = self.task.to_proto()
        backend = self.backend.to_proto()
        scene = self.scene.to_proto()
        analyzers = list(map(lambda a: a.to_proto(), self.analyzers))

        b = CommandConfigMsg.BundleConfig(task=task,
                                          backend=backend,
                                          scene=scene,
                                          analyzers=analyzers)

        msg.MergeFrom(CommandConfigMsg(bundle_config=b))

        return msg