(self, mid)
execute cnn training
            sample cmd: python -u inception_train/train.py --mid=9 \
                    --early_stop=20 --data_path=./cifar/pickle-cifar-10
execute cnn training
            sample cmd: python -u inception_train/train.py --mid=9 \
                    --early_stop=20 --data_path=./cifar/pickle-cifar-10
execute cnn training sample cmd : python - u inception_train / train . py -- mid = 9 \ -- early_stop = 20 -- data_path = . / cifar / pickle - cifar - 10
def supervisor(self, mid):
        """
            execute cnn training
            sample cmd: python -u inception_train/train.py --mid=9 \
                    --early_stop=20 --data_path=./cifar/pickle-cifar-10
        """
        tokens, adjvec = utils.load_action(mid, self.log_dir)
        cmd = ("CUDA_VISIBLE_DEVICES=1 python -u inception_train/train.py \
               --mid=%d --early_stop=%d --logdir=%s --data_path=%s --chunk_size=%d") % \
              (mid, self.early_stop, self.log_dir, self.data_path, self.chunk_size)
        print("cmd:{}".format(cmd))
        while True:
            try:
                subprocess.check_call(cmd, shell=True)
                break
            except subprocess.CalledProcessError as e:
                print("[%s] training model #%d exits with exit code %d" %
                      (utils.stime(), mid, e.returncode), file=sys.stderr)
                return
def supervisor ( self , mid ) : tokens , adjvec = utils . load_action ( mid , self . log_dir ) cmd = ( "CUDA_VISIBLE_DEVICES=1 python -u inception_train/train.py \
               --mid=%d --early_stop=%d --logdir=%s --data_path=%s --chunk_size=%d" ) % ( mid , self . early_stop , self . log_dir , self . data_path , self . chunk_size ) print ( "cmd:{}" . format ( cmd ) ) while True : try : subprocess . check_call ( cmd , shell = True ) break except subprocess . CalledProcessError as e : print ( "[%s] training model #%d exits with exit code %d" % ( utils . stime ( ) , mid , e . returncode ) , file = sys . stderr ) return