Exemplo n.º 1
0
    def run(self):
        if util.windows():
            self.checkMSBuildPath()

        self.setGlobalFlags()

        if self.args.driver is None:
            self.runMainDriver()
        elif self.args.driver == "compiler":
            self.runCompilerDriver()
        elif self.args.driver == "converter":
            self.runConverterDriver()
        elif self.args.driver == "predictor":
            self.runPredictorDriver()
Exemplo n.º 2
0
    def run(self):
        if Util.windows():
            self.checkMSBuildPath()

        algo, version, trainingInput, testingInput, modelDir = self.args.algo, Common.Version.Fixed, self.args.train, self.args.test, self.args.model

        print("\n================================")
        print("Executing on %s for Arduino" % (algo))
        print("--------------------------------")
        print("Train file: %s" % (trainingInput))
        print("Test file: %s" % (testingInput))
        print("Model directory: %s" % (modelDir))
        print("================================\n")

        obj = Main(algo, version, Common.Target.Arduino, trainingInput,
                   testingInput, modelDir, None)
        obj.run()
Exemplo n.º 3
0
    def run(self):
        if util.windows():
            self.checkMSBuildPath()

        trainingInput, testingInput, modelDir = self.args.train, self.args.test, self.args.model
        algo, version = config.Algo.bonsai, self.args.version

        print("\n================================")
        print("Compiling for Arduino")
        print("--------------------------------")
        print("Train file: %s" % (trainingInput))
        print("Test file: %s" % (testingInput))
        print("Model directory: %s" % (modelDir))
        print("================================\n")

        obj = Main(algo, version, config.Target.arduino, trainingInput,
                   testingInput, modelDir, None)
        obj.run()
Exemplo n.º 4
0
 def build(self):
     if Util.windows():
         return self.buildForWindows()
     else:
         return self.buildForLinux()
Exemplo n.º 5
0
 def execute(self):
     if Util.windows():
         return self.executeForWindows()
     else:
         return self.executeForLinux()