Skip to content

Commit

Permalink
Fix validity time check for UFO pickle (mg5amcnlo#97)
Browse files Browse the repository at this point in the history
* In models/import_ufo.py, include  models/import_ufo.py itself in the list of files to check pickle validity (see mg5amcnlo#89)

* In madgraph/iolibs/files.py, bug fix in pickle validity check: use getmtime instead of getctime (see mg5amcnlo#89)

* In models/import_ufo.py and madgraph/iolibs/files.py, remove debug printouts from the patch for mg5amcnlo#89

* In madgraph/iolibs/files.py, go back from getctime to getmtime in pickle validity check as suggested by Olivier, this is enough

* In models/import_ufo.py, use __file__ to include models/import_ufo.py itself in the list of files to check pickle validity (see mg5amcnlo#89)
  • Loading branch information
valassi authored May 21, 2024
1 parent 619f5db commit f9f9579
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions models/import_ufo.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ def import_full_model(model_path, decay=False, prefix=''):
raise UFOImportError("%s directory is not a valid UFO model: \n %s is missing" % \
(model_path, filename))
files_list.append(filepath)
files_list.append(__file__) # include models/import_ufo.py itself, see mg5amcnlo/mg5amcnlo#89
# use pickle files if defined and up-to-date
if aloha.unitary_gauge:
pickle_name = 'model.pkl'
Expand Down

0 comments on commit f9f9579

Please sign in to comment.