Open bernstei opened 2 months ago
First statement is for removing duplicate heads, transforming ["pbe_mp", "pbe_mp", "r2scan"] to ["pbe_mp", "r2scan"]. Second line, we should remove.
First statement is for removing duplicate heads, transforming ["pbe_mp", "pbe_mp", "r2scan"] to ["pbe_mp", "r2scan"].
if we know that heads
starts out as a list, list(set(["pbe_mp"] + heads))
is cleaner in my opinion. But if we care about the order, I'm not sure what set()
guarantees. But also, if we care about the order, I think something more explicit is better anyway (e.g. ["pbe_mp"] + list(set(heads) - set(["pbe_mp"]))
. What exactly are the requirements of the result of this statement?
[edit] Or, maybe cleaner to just do
if "pbe_mp" not in heads:
heads = ["pbe_mp"] + heads
or heads.insert("pbe_mp", 0)
, if we want to modify the existing object
What is line line supposed to be doing? https://github.com/ACEsuit/mace/blob/fb35950bea8d720c2dde923c9b4fbd153d6b92ab/mace/cli/run_train.py#L184
Why are these keys taken from the user's settings, rather than a default (plain?) property name, or just ignored? https://github.com/ACEsuit/mace/blob/fb35950bea8d720c2dde923c9b4fbd153d6b92ab/mace/cli/run_train.py#L265