-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinference.py
34 lines (24 loc) · 1.06 KB
/
inference.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from art import tprint
import argparse
from DroppedNeurons import inference
# Please create a file inference.py that will run your best model and takes an
# argument -s path/to/dataset to specify the data directory. This script will be used to evaluate your
# model on a test dataset. You can assume that the folder structure within the dataset directory is consistent
# with the training dataset you have. The script should print key perfomance metrics that prove the
# performance of you model
def parse_arguments():
parser = argparse.ArgumentParser(description="run inference")
parser.add_argument("-s", "--dataset_path", type=str, required=True,
help="Path to the dataset file (jsonl format)")
args = parser.parse_args()
return args
def main():
args = parse_arguments()
dataset_path = args.dataset_path
# Pretty Title
tprint("DroppedNeurons")
tprint("Inference")
# Call the appropriate function based on command
inference.run(args.dataset_path, 'best')
if __name__ == "__main__":
main()