Skip to content

Commit

Permalink
Moving collect over replcias in n3fit_data
Browse files Browse the repository at this point in the history
  • Loading branch information
achiefa committed Aug 1, 2024
1 parent 6442637 commit af8764d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
9 changes: 3 additions & 6 deletions n3fit/src/n3fit/scripts/n3fit_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,15 @@ def from_yaml(cls, o, *args, **kwargs):
if fps := file_content["fitting"].get("savepseudodata", True):
if fps != True:
raise TypeError(f"fitting::savepseudodata is neither True nor False ({fps})")
if len(kwargs["environment"].replicas) != 1:
#if len(kwargs["environment"].replicas) != 1:
#raise ConfigError(
# "Cannot request that multiple replicas are fitted and that "
# "pseudodata is saved. Either set `fitting::savepseudodata` "
# "to `false` or fit replicas one at a time."
#)
training_action = collect(namespace + "training_pseudodata", ("replicas",))
validation_action = collect(namespace + "validation_pseudodata", ("replicas",))
else:
# take same namespace configuration on the pseudodata_table action.
training_action = namespace + "training_pseudodata"
validation_action = namespace + "validation_pseudodata"
training_action = namespace + "training_pseudodata"
validation_action = namespace + "validation_pseudodata"

N3FIT_FIXED_CONFIG['actions_'].extend((training_action, validation_action))

Expand Down
3 changes: 2 additions & 1 deletion validphys2/src/validphys/n3fit_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ def replica_nnseed_fitting_data_dict(replica, exps_fitting_data_dict, replica_nn
"""
return (replica, exps_fitting_data_dict, replica_nnseed)


replicas_training_pseudodata = collect("training_pseudodata", ("replicas",))
replicas_validationf_pseudodata = collect("validation_pseudodata", ("replicas",))
replicas_nnseed_fitting_data_dict = collect("replica_nnseed_fitting_data_dict", ("replicas",))
groups_replicas_indexed_make_replica = collect(
"indexed_make_replica", ("replicas", "group_dataset_inputs_by_experiment")
Expand Down

0 comments on commit af8764d

Please sign in to comment.