def trainTopicModel(self, topicModelParams, forceTrainOption): if os.path.exists(self.modelParamsPath + '.twords') and not forceTrainOption: logging.info(' skipping training: ' + self.currDB) return logging.info('trainTopicModel: ' + self.currDB) LDAcmd = [self.trainExecutablePath, '-est', \ '-ntopics', str(topicModelParams['numTopics']), \ '-niters', str(topicModelParams['numIters']), \ '-twords', str(topicModelParams['twords']), \ '-dfile', self.tokensPath] timeout = topicModelParams['maxRunTime'] runner = RunExternal(LDAcmd, timeout, pipeOption = False) runner.run()
def zip(self, path): logging.info('MakeVideoLogs.zip(), ' + self.currCourseName) zipExec = RunExternal(['gzip', path], 3600) zipExec.run()
def unzip(self, path): logging.info('MakeVideoLogs.unzip(), ' + self.currCourseName) zipExec = RunExternal(['gunzip',path],3600) zipExec.run()
def zip(self,path): logging.info('MakeForumViewLogs.zip(), ' + self.currCourseName) zipExec = RunExternal(['gzip',path],3600) zipExec.run()
def unzip(self, path): logging.info('MakeForumViewLogs.unzip(), ' + self.currCourseName) zipExec = RunExternal(['gunzip', path], 3600) zipExec.run()