ACEsuit / mace

MACE - Fast and accurate machine learning interatomic potentials with higher order equivariant message passing.
Other
413 stars 157 forks source link

undefined calc in multi-head-finetune branch run_train.py #380

Open bernstei opened 2 months ago

bernstei commented 2 months ago

In the multi-head-finetune branch, mace/cli/run_train.py line 432 https://github.com/ACEsuit/mace/blob/f5ab9c5d45e09ac49c7874c44a14ba83c813d5ab/mace/cli/run_train.py#L432 refers to a variable calc, but there are many code paths (various nested ifs around https://github.com/ACEsuit/mace/blob/f5ab9c5d45e09ac49c7874c44a14ba83c813d5ab/mace/cli/run_train.py#L93) that don't define it

bernstei commented 2 months ago

I can work around it by checking if calc was defined as part of the test on line 432, but since I'm not sure why you added that test to the if statement, I don't know if that's actually correct.