At the moment we need to use frozendict (as part of this decorator)
due to the Rules here being loaded unnecessarily often. In particular, they get loaded once per replica (I guess during replica generation) which should not be necessary, as a parallelisation over replicas will always have the same rules.
Probably it is enough with reading the actual rules from either filter.yml or the runcard into a frozen dataclass as done with the data
|
class ObservableMetaData: |
since rules should be immutable.
At the moment we need to use
frozendict(as part of this decorator)nnpdf/validphys2/src/validphys/utils.py
Line 25 in 19930c1
due to the
Ruleshere being loaded unnecessarily often. In particular, they get loaded once per replica (I guess during replica generation) which should not be necessary, as a parallelisation over replicas will always have the same rules.Probably it is enough with reading the actual rules from either
filter.ymlor the runcard into a frozen dataclass as done with the datannpdf/validphys2/src/validphys/commondataparser.py
Line 357 in 19930c1