Exemplo n.º 1
0
 def run(self):
     make_dirs('output/summary/')
     call([
         'python3', 'qanta/reporting/performance.py', 'generate',
         c.PRED_TARGET.format(self.fold),
         c.META_TARGET.format(self.fold),
         'output/summary/{0}.json'.format(self.fold)
     ])
Exemplo n.º 2
0
Arquivo: vw.py Projeto: xxlatgh/qb
 def run(self):
     make_dirs('output/models/')
     call([
         'vw',
         '-d', c.VW_INPUT.format('dev'),
         '-b', '30',
         '--loss_function', 'logistic',
         '-f', c.VW_MODEL
     ])
Exemplo n.º 3
0
Arquivo: all.py Projeto: Pinafore/qb
 def run(self):
     make_dirs('output/summary/')
     call([
         'python3',
         'qanta/reporting/performance.py',
         'generate',
         c.PRED_TARGET.format(self.fold),
         c.META_TARGET.format(self.fold),
         'output/summary/{0}.json'.format(self.fold)
     ])
Exemplo n.º 4
0
Arquivo: all.py Projeto: NPSDC/qb
 def run(self):
     make_dirs("output/summary/")
     call([
         "python3",
         "qanta/reporting/performance.py",
         "generate",
         c.PRED_TARGET.format(self.fold),
         c.META_TARGET.format(self.fold),
         "output/summary/{0}.json".format(self.fold),
     ])
Exemplo n.º 5
0
Arquivo: vw.py Projeto: xxlatgh/qb
 def run(self):
     make_dirs('output/predictions/')
     shell(
         ('vw -t '
          '-d output/vw_input/{fold}.vw.txt '
          '--loss_function logistic '
          '-i {vw_model} --audit '
          '| python cli.py format_vw_audit '
          '> output/predictions/{fold}.audit').format(fold='test', vw_model=c.VW_MODEL)
     )
Exemplo n.º 6
0
Arquivo: vw.py Projeto: xxlatgh/qb
 def run(self):
     make_dirs('output/predictions/')
     call([
         'vw',
         '-t',
         '--loss_function', 'logistic',
         '-d', c.VW_INPUT.format(self.fold),
         '-i', c.VW_MODEL,
         '-p', c.VW_PREDICTIONS.format(self.fold)
     ])
Exemplo n.º 7
0
Arquivo: tagme.py Projeto: nadesai/qb
    def run(self):
        make_dirs('output/tagme/')
        db = QuestionDatabase()
        questions = list(db.all_questions().values())
        batch = 0
        batch_lookup = {}

        while batch * BATCH_SIZE < len(questions):
            batch_questions = questions[batch * BATCH_SIZE:(batch + 1) *
                                        BATCH_SIZE]
            batch_lookup[batch] = batch_questions
            batch += 1

        with open('output/tagme/batches.pickle', 'wb') as f:
            pickle.dump(batch_lookup, f)

        with open('output/tagme/meta.pickle', 'wb') as f:
            pickle.dump(batch, f)
Exemplo n.º 8
0
Arquivo: buzzer.py Projeto: NPSDC/qb
 def run(self):
     make_dirs(safe_path("output/predictions/"))
     make_dirs(safe_path("output/expo/"))
     make_dirs(safe_path("output/vw_input/"))
     config = conf["buzzer"]["config"]
     buzzer_test.generate(config, [self.fold])
Exemplo n.º 9
0
Arquivo: buzzer.py Projeto: NPSDC/qb
 def run(self):
     make_dirs(safe_path("output/buzzers/"))
     train_cost_sensitive(conf["buzzer"]["config"],
                          c.BUZZER_GENERATION_FOLDS)
Exemplo n.º 10
0
 def run(self):
     make_dirs(safe_path('output/predictions/'))
     make_dirs(safe_path('output/expo/'))
     make_dirs(safe_path('output/vw_input/'))
     config=conf['buzzer']['config']
     buzzer_test.generate(config, [self.fold])
Exemplo n.º 11
0
 def run(self):
     make_dirs(safe_path('output/buzzers/'))
     train_cost_sensitive(conf['buzzer']['config'], c.BUZZER_GENERATION_FOLDS)
Exemplo n.º 12
0
 def run(self):
     make_dirs(safe_path('output/predictions/'))
     make_dirs(safe_path('output/expo/'))
     make_dirs(safe_path('output/vw_input/'))
     args = Namespace(fold=self.fold, config=conf['buzzer']['config'])
     buzzer_test.generate(args)
Exemplo n.º 13
0
 def run(self):
     make_dirs(safe_path('output/buzzers/'))
     args = Namespace(config=conf['buzzer']['config'], epochs=6, load=False)
     train_cost_sensitive(args)
Exemplo n.º 14
0
Arquivo: vw.py Projeto: xxlatgh/qb
 def output(self):
     make_dirs('output/predictions/')
     return LocalTarget(
         c.VW_PREDICTIONS.format(self.fold))