def main(unused_argv): logging.getLogger('mlperf_compliance').propagate = False sgf_dir = os.path.join(fsdb.eval_dir(), 'target') target = 'tf,' + os.path.join(fsdb.models_dir(), 'target.pb.og') models = load_train_times() timestamp_to_log = 0 iter_evaluated = 0 for i, (timestamp, name, path) in enumerate(models): minigo_print(key=constants.EVAL_START, metadata={'epoch_num': i + 1}) iter_evaluated += 1 winrate = wait(evaluate_model(path + '.og', target, sgf_dir, i + 1)) minigo_print(key=constants.EVAL_ACCURACY, value=winrate, metadata={'epoch_num': i + 1}) minigo_print(key=constants.EVAL_STOP, metadata={'epoch_num': i + 1}) if winrate >= 0.50: timestamp_to_log = timestamp print('Model {} beat target after {}s'.format(name, timestamp)) break minigo_print(key='eval_result', metadata={ 'iteration': iter_evaluated, 'timestamp': timestamp_to_log })
def main(unused_argv): sgf_dir = os.path.join(fsdb.eval_dir(), 'target') target = 'tf,' + os.path.join(fsdb.models_dir(), 'target.pb') models = load_train_times() for i, (timestamp, name, path) in enumerate(models): winrate = wait(evaluate_model(path, name, target, sgf_dir)) if winrate >= 0.50: break
def main(unused_argv): sgf_dir = os.path.join(fsdb.eval_dir(), 'target') target = 'tf,' + os.path.join(fsdb.models_dir(), 'target.pb') models = load_train_times() for i, (timestamp, name, path) in enumerate(models): winrate = wait(evaluate_model(path, target, sgf_dir, i + 1)) if winrate >= 0.50: print('Model {} beat target after {}s'.format(name, timestamp)) break
def main(unused_argv): sgf_dir = os.path.join(fsdb.eval_dir(), 'target') target = 'tf,' + os.path.join(fsdb.models_dir(), 'target.pb') models = load_train_times() for i, (timestamp, name, path) in enumerate(models): mll.eval_start(i) winrate = wait(evaluate_model(path, target, sgf_dir, i + 1)) mll.eval_stop(i) mll.eval_accuracy(i, winrate) if winrate >= 0.50: print('Model {} beat target after {}s'.format(name, timestamp)) mll.eval_result(i, timestamp) mll.run_stop('success') return mll.eval_result(i, 0) mll.run_stop('aborted')