Skip to content

Commit

Permalink
Merge pull request #1922 from NNPDF/update_fitbot_4.0.8_replica_by_re…
Browse files Browse the repository at this point in the history
…plica

Update fit bot for 4.0.8
  • Loading branch information
scarlehoff authored Jan 29, 2024
2 parents c3f896a + 209f310 commit f40ddd9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/fitbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
run: |
conda activate nnpdfenv
cd $RUNFOLDER
for ((i=1; i<=$N3FIT_MAXNREP; i+=2)); do n3fit $RUNCARD.yml $i -r $((i+1)); done
for ((i=1; i<=$N3FIT_MAXNREP; i+=1)); do n3fit $RUNCARD.yml $i ; done
# performing DGLAP
- name: Running dglap
shell: bash -l {0}
Expand Down
9 changes: 5 additions & 4 deletions n3fit/src/n3fit/backends/keras_backend/MetaModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,9 @@ def get_replica_weights(self, i_replica):
"""
Get the weights of replica i_replica.
This assumes that the only weights are in layers called
``NN_{i_replica}`` and ``preprocessing_factor_{i_replica}``
This assumes that the only weights are in the
layer types defined as the constants
NN_LAYER_ALL_REPLICAS & PREPROCESSING_LAYER_ALL_REPLICAS
Parameters
----------
Expand Down Expand Up @@ -458,7 +458,8 @@ def get_layer_replica_weights(layer, i_replica: int):
list of weights for the replica
"""
if is_stacked_single_replicas(layer):
weights = layer.get_layer(f"{NN_PREFIX}_{i_replica}").weights
weights_ref = layer.get_layer(f"{NN_PREFIX}_{i_replica}").weights
weights = [tf.Variable(w, name=w.name) for w in weights_ref]
else:
weights = [tf.Variable(w[i_replica : i_replica + 1], name=w.name) for w in layer.weights]

Expand Down
2 changes: 2 additions & 0 deletions validphys2/src/validphys/tests/photon/test_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@


def generate_fiatlux_runcard():
# Ensures the PDF from conftest exists
_ = FallbackLoader().check_pdf(PDF)
return {
"luxset": PDFset(PDF),
# check if "LUXqed17_plus_PDF4LHC15_nnlo_100" is installed
Expand Down

0 comments on commit f40ddd9

Please sign in to comment.