OmegaConfã®ä¸»è¦æ©è½ã«mergeãããã
ãã®mergeæ©è½ãListã«é¢ãã¦ãçã¯éã£ã¦ãããçã®ããæ¯ãèãããããã
Merge == Reassign
OmegaConfã®Listã«å¯¾ããmerge㯠reassign ã¨ãã¦ã®ã¿æ©è½ããã
from omegaconf import OmegaConf conf1 = OmegaConf.create([ {"attrN": 1, "attrS": "hello"}, {"attrN": 2, "attrS": "world"}, ]) conf2 = OmegaConf.create([ {"attrN": 3,}, {"attrN": 4,}, ]) OmegaConf.merge(conf1, conf2) // [{'attrN': 3}, {'attrN': 4}]
ãã®ããã«list mergeã¯appendã¨ãã¦æ©è½ããªãããDictã®ãããªè¦ç´ mixããã¦ãããªãã
ããã¯æå³ããè¨è¨ã¨ã®ãã¨
As of OmegaConf 2.0, lists merge is always replacing the target list.
Omry Yadan
python - OmegaConf can I influence how lists are merged - Stack Overflow