Skip to content

Commit

Permalink
Skip-existing skips feature.pkl.xz if --compress-features=True
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaMolod committed Sep 6, 2024
1 parent 6ce8fea commit 1e88741
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alphapulldown/scripts/create_individual_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ def create_and_save_monomer_objects(monomer, pipeline):
pipeline (DataPipeline): The data pipeline object for feature creation.
"""
pickle_path = os.path.join(FLAGS.output_dir, f"{monomer.description}.pkl")

if FLAGS.compress_features:
pickle_path = pickle_path + ".xz"
# Check if we should skip existing files
if FLAGS.skip_existing and os.path.exists(pickle_path):
logging.info(
Expand Down Expand Up @@ -263,7 +264,6 @@ def create_and_save_monomer_objects(monomer, pipeline):

# Save the processed monomer object
if FLAGS.compress_features:
pickle_path = pickle_path + ".xz"
with lzma.open(pickle_path, "wb") as pickle_file:
pickle.dump(monomer, pickle_file)
else:
Expand Down

0 comments on commit 1e88741

Please sign in to comment.