-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgoogle_scoring.py
More file actions
36 lines (26 loc) · 1.17 KB
/
google_scoring.py
File metadata and controls
36 lines (26 loc) · 1.17 KB
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
35
36
# %% IMPORTING MODULES
import sys
import os
# %% FUNCTIONS
def collect_arguments():
working_dir = os.getcwd()
arguments = sys.argv
if len(arguments) >= 4:
print("Not all arguments used, only first two used, others are neglected.")
elif len(arguments) != 3:
raise ValueError("You should give two arguments!")
# Make filepath
input_google_filepath = os.path.join(working_dir, 'data', 'input', arguments[1])
output_model_filepath = os.path.join(working_dir, 'data', 'output', arguments[2])
if not os.path.isfile(input_google_filepath) or not os.path.isfile(output_model_filepath):
raise ValueError(f"Could not find these files: {arguments[1]} and {arguments[2]} in their folders.")
else:
print(f"Using input google filepath: {input_google_filepath}")
print(f"Using model output filepath: {output_model_filepath}")
return input_google_filepath, output_model_filepath
def google_score(input_google_filename, output_model_filename):
return
# %% MAIN
if __name__ == '__main__':
input_google_filepath, output_model_filepath = collect_arguments()
google_score(input_google_filepath, output_model_filepath)