From fe63b6d3138f6fba7c44c1f977f81abdeb697a6d Mon Sep 17 00:00:00 2001 From: Fize Jacques <jacques.fize@cirad.fr> Date: Mon, 25 Jan 2021 12:50:12 +0100 Subject: [PATCH] Update parameters theoric --- generate_theoric_random_graph.py | 12 ++++++------ run_eval.py | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/generate_theoric_random_graph.py b/generate_theoric_random_graph.py index ab866b7..0709bda 100644 --- a/generate_theoric_random_graph.py +++ b/generate_theoric_random_graph.py @@ -35,10 +35,10 @@ parameters = { "l": [3,5,8], "k": [10,20], "p_in": [0.2,0.5,0.7], - "p_out": [0.1,0.2,0.3] + "p_out": [0.1] }, "stochastic_block_model": { - "sizes": [[random.choice([10,20,30]) for k in range(i)] for i in [3,5,8,10,12]], + "sizes": [[random.choice([10,20,30]) for k in range(i)] for i in [3,5,8]], "p": [] # Filled later }, "fast_gnp_random_graph": { @@ -49,10 +49,10 @@ parameters = { "n": GRAPH_SIZE, "tries":[10000] }, - "random_geometric_graph": { - "n": GRAPH_SIZE, - "radius": [0.1,0.4,0.6] - }, + # "random_geometric_graph": { + # "n": GRAPH_SIZE, + # "radius": [0.4,0.6] + # }, "waxman_graph": { "n": GRAPH_SIZE, "beta": [0.4,0.6], diff --git a/run_eval.py b/run_eval.py index 79e8b45..21d3958 100644 --- a/run_eval.py +++ b/run_eval.py @@ -17,7 +17,7 @@ parser.add_argument("output_filename") parser.add_argument("-f", "--format", default="gexf", choices=["gexf", "gml", "txt"]) args = parser.parse_args() -fns = glob.glob(args.dataset_dir + "/*." + args.format) +fns = sorted(glob.glob(args.dataset_dir + "/*." + args.format)) all_res = [] pbar = tqdm(fns) @@ -26,7 +26,8 @@ for fn in pbar: continue pbar.set_description("run eval on "+ fn) command = "python evalNE_script.py {0} -f {1} -n".format(fn, args.format).split() - output = subprocess.run(command) + output = subprocess.run(command,stdout=subprocess.DEVNULL, + stderr=subprocess.STDOUT) if not output.returncode == 0: print("Error! for the command :", " ".join(command)) continue -- GitLab