Beispiel #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)
     ])
Beispiel #2
0
Datei: vw.py Projekt: 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
     ])
Beispiel #3
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)
     ])
Beispiel #4
0
Datei: all.py Projekt: 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),
     ])
Beispiel #5
0
Datei: vw.py Projekt: 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)
     )
Beispiel #6
0
Datei: vw.py Projekt: 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)
     ])
Beispiel #7
0
    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)
Beispiel #8
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])
Beispiel #9
0
 def run(self):
     make_dirs(safe_path("output/buzzers/"))
     train_cost_sensitive(conf["buzzer"]["config"],
                          c.BUZZER_GENERATION_FOLDS)
Beispiel #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])
Beispiel #11
0
 def run(self):
     make_dirs(safe_path('output/buzzers/'))
     train_cost_sensitive(conf['buzzer']['config'], c.BUZZER_GENERATION_FOLDS)
Beispiel #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)
Beispiel #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)
Beispiel #14
0
Datei: vw.py Projekt: xxlatgh/qb
 def output(self):
     make_dirs('output/predictions/')
     return LocalTarget(
         c.VW_PREDICTIONS.format(self.fold))