mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 05:28:13 +02:00
added output to manual_selection in order not to
overwrite every time
This commit is contained in:
@ -77,6 +77,7 @@ def edit_hunk(hunk: str) -> str:
|
|||||||
|
|
||||||
def main(
|
def main(
|
||||||
dataset_path: str,
|
dataset_path: str,
|
||||||
|
output: str,
|
||||||
overwrite: bool = False,
|
overwrite: bool = False,
|
||||||
validation_mode: ValidationMode = ValidationMode.REFINEMENT,
|
validation_mode: ValidationMode = ValidationMode.REFINEMENT,
|
||||||
check_diff_relevance: bool = False,
|
check_diff_relevance: bool = False,
|
||||||
@ -230,8 +231,8 @@ def main(
|
|||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("\nInterrupted.")
|
print("\nInterrupted.")
|
||||||
finally:
|
finally:
|
||||||
print(f"Saving dataset to {dataset_path}...", end=" ", flush=True)
|
print(f"Saving dataset to {output}...", end=" ", flush=True)
|
||||||
dataset.to_json(dataset_path)
|
dataset.to_json(output)
|
||||||
print("Done")
|
print("Done")
|
||||||
|
|
||||||
|
|
||||||
@ -239,7 +240,16 @@ if __name__ == "__main__":
|
|||||||
parser = argparse.ArgumentParser(description="Manual selection of dataset")
|
parser = argparse.ArgumentParser(description="Manual selection of dataset")
|
||||||
parser.add_argument("dataset", type=str, help="Path to the dataset file")
|
parser.add_argument("dataset", type=str, help="Path to the dataset file")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-o", "--overwrite", action="store_true", help="Re-evaluate existing selections"
|
"-o",
|
||||||
|
"--output",
|
||||||
|
required=True,
|
||||||
|
type=str,
|
||||||
|
help="The path to the resulting dataset",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--overwrite",
|
||||||
|
action="store_true",
|
||||||
|
help="Re-evaluate existing selections",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-m",
|
"-m",
|
||||||
|
Reference in New Issue
Block a user