Fixing EIXGNN parameter bug

This commit is contained in:
araison 2023-01-16 17:49:42 +01:00
parent 4c452d1f2a
commit 0a695d6f28
1 changed files with 13 additions and 0 deletions

View File

@ -236,3 +236,16 @@ if "__main__" == __name__:
+ f"dataset={dataset_name}-model={model_kind}-explainer={explainer_name}_{obj_config_to_str(explainer_c)}.yaml"
)
write_yaml(explaining_cfg, PATH)
os.makedirs(explaining_folder + "/0", exists_ok=True)
os.makedirs(explaining_folder + "/1", exists_ok=True)
a = glob.glob(explaining_folder + "/*.yaml")
for path in a[:8050]:
basename = os.path.basename(path)
dirname = os.path.dirname(path)
os.rename(path, dirname + "/0/" + basename)
for path in a[8050:]:
basename = os.path.basename(path)
dirname = os.path.dirname(path)
os.rename(path, dirname + "/1/" + basename)