Esempio n. 1
0
        print("Path given to log_dir argument is not a path")
        quit()
    try:
        local = Path(flags.saves_dir)
        local.mkdir(exist_ok=True)
    except:
        print("Path given to saves_dir argument is not a path")
        quit()

    if flags.test_set_size % flags.evaluation_batchsize != 0:
        print("Test set size should be divisible by the evaluation batchsize")
        quit()
    if flags.batch_size % flags.agents != 0:
        print("Batch size should be divisible by the number of agents")
        # otherwise id doesn't do the specified number of iterations
    logger.Logger_setup(gap=20, state=True, debug=False)
    print("begin")
    log_file_name = flags.log_file_names
    print(flags, flush=True)
    ags = flags.agents
    i = 0
    n = ags
    scale = ags
    staleness = True

    os.sched_setaffinity(0, list(range(0, flags.threads)))
    flags.time_stamps_file_name = log_file_name + "_times_" + str(
        n) + '_' + 'scale=' + str(scale) + '_' + "#agents=" + str(
            ags) + ":itr=" + str(i) + ":spcl=" + str(staleness)
    flags.staleness_file_name = log_file_name + "_stl_" + str(
        n) + '_' + 'scale=' + str(scale) + '_' + "#agents=" + str(