|
13 | 13 | from matbench_discovery.slurm import slurm_submit
|
14 | 14 | from models.voronoi import featurizer
|
15 | 15 |
|
16 |
| -module_dir = os.path.dirname(__file__) |
17 |
| - |
18 | 16 | data_name = "mp" # "mp"
|
19 | 17 | if data_name == "wbm":
|
20 | 18 | data_path = f"{ROOT}/data/wbm/2022-10-19-wbm-init-structs.json.bz2"
|
21 | 19 | input_col = "initial_structure"
|
22 | 20 | elif data_name == "mp":
|
23 | 21 | data_path = f"{ROOT}/data/mp/2022-09-16-mp-computed-structure-entries.json.gz"
|
24 |
| - input_col = "structure" |
| 22 | + input_col = "relaxed_structure" |
25 | 23 |
|
26 |
| -slurm_array_task_count = 30 |
27 | 24 | debug = "slurm-submit" in sys.argv
|
28 | 25 | job_name = f"voronoi-features-{data_name}{'-debug' if DEBUG else ''}"
|
| 26 | +module_dir = os.path.dirname(__file__) |
29 | 27 | out_dir = os.environ.get("SBATCH_OUTPUT", f"{module_dir}/{today}-{job_name}")
|
| 28 | +slurm_array_task_count = 50 |
30 | 29 |
|
31 | 30 |
|
32 | 31 | slurm_vars = slurm_submit(
|
|
70 | 69 | df=dict(shape=str(df_this_job.shape), columns=", ".join(df_this_job)),
|
71 | 70 | input_col=input_col,
|
72 | 71 | slurm_vars=slurm_vars,
|
| 72 | + out_path=out_path, |
73 | 73 | )
|
74 |
| -if wandb.run is None: |
75 |
| - wandb.login() |
76 | 74 |
|
77 | 75 | wandb.init(project="matbench-discovery", name=run_name, config=run_params)
|
78 | 76 |
|
|
82 | 80 | warnings.filterwarnings(action="ignore", category=UserWarning, module="pymatgen")
|
83 | 81 |
|
84 | 82 | df_features = featurizer.featurize_dataframe(
|
85 |
| - df_this_job, input_col, ignore_errors=True, pbar=dict(position=0, leave=True) |
86 |
| -) |
| 83 | + df_this_job, input_col, ignore_errors=True |
| 84 | +)[featurizer.feature_labels()].round(6) |
87 | 85 |
|
88 | 86 |
|
89 | 87 | # %%
|
90 |
| -df_features[featurizer.feature_labels()].to_csv(out_path) |
| 88 | +df_features.to_csv(out_path) |
91 | 89 |
|
92 | 90 | wandb.log({"voronoi_features": wandb.Table(dataframe=df_features)})
|
0 commit comments