-
-
Save kevinmelodi/7da5fe653c4d8f36a0d987e6ad67cf8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import argparse | |
# Initialize argparse to parse command-line arguments | |
parser = argparse.ArgumentParser(description="Run a Prodigy custom-text-classification task.") | |
parser.add_argument("--dataset", required=True, help="The name of the dataset.") | |
parser.add_argument("--input_file", required=True, help="The path to the input file on the local prodigy machine.") | |
# Parse the arguments | |
args = parser.parse_args() | |
# Your command broken down into its individual components, with the timestamp | |
command = [ | |
"prodigy", | |
"custom-text-classification", # task name/recipe/layout | |
args.dataset, # dataset name from command line args | |
args.input_file, # input file path from command line args | |
"-F", | |
"scripts/custom_task_template.py" # layout source | |
] | |
# Run the command | |
subprocess.run(command) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment