Skip to content

Commit

Permalink
Cleanup output when exporting HDF5 models
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Kümmmerer <[email protected]>
  • Loading branch information
matthias-k committed May 2, 2024
1 parent c0844ee commit c925d86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pysaliency/precomputed_models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import absolute_import, division, print_function

import glob
import logging
import os.path
import tarfile
import warnings
Expand Down Expand Up @@ -102,7 +103,7 @@ def export_model_to_hdf5(model, stimuli, filename, compression=9, overwrite=True
with h5py.File(filename, mode=mode) as f:
for k, s in enumerate(tqdm(stimuli)):
if not overwrite and names[k] in f:
print("Skipping already existing entry", names[k])
logging.debug(f"Skipping already existing entry {names[k]}")
continue
if isinstance(model, SaliencyMapModel):
smap = model.saliency_map(s)
Expand Down

0 comments on commit c925d86

Please sign in to comment.