Skip to content

Commit

Permalink
Fixed bug: report succes of output to logger properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Sara Veldhoen committed Nov 24, 2023
1 parent 9f56d9d commit 9241b48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions feature_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _save_features_to_file(features: torch.Tensor, output_file_path: str) -> boo
if not os.path.isdir(parent_dir):
logger.info("Parent dir, did not exist, creating it now")
os.makedirs(parent_dir)
np.save(output_file_path, np.array(features))
return True
except Exception:
logger.exception("Failed to save features to file")
return False
return False

0 comments on commit 9241b48

Please sign in to comment.