NNPDF/nnpdf

Remove the need for `frozendict`

Closed this issue · 1 comments

At the moment we need to use frozendict (as part of this decorator)

def freeze_args(func):

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.

Closed by #2076