Code-Repair-w-LLMs / utils /convert_steps.py
vineyard03's picture
Upload folder using huggingface_hub
9adf324 verified
raw
history blame contribute delete
279 Bytes
def convert_steps(selected_steps):
"""Converts selected steps into a binary value (bitmask)."""
all_steps = ["Bug Finding", "Pattern Matching", "Patch Generation", "Patch Validation"]
return sum(1 << i for i, step in enumerate(all_steps) if step in selected_steps)