add logging
Browse files
app.py
CHANGED
@@ -64,23 +64,35 @@ def run_evaluation(model_name):
|
|
64 |
pred_path = Path(output_dir) / pred_filename
|
65 |
results.append(f"Prediction will be saved to: {pred_path}")
|
66 |
|
|
|
|
|
|
|
67 |
# Run prediction
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
results.append("Prediction completed.")
|
85 |
|
86 |
# Run evaluation
|
|
|
64 |
pred_path = Path(output_dir) / pred_filename
|
65 |
results.append(f"Prediction will be saved to: {pred_path}")
|
66 |
|
67 |
+
# Debug: Print predict function signature
|
68 |
+
yield f"Predict function signature: {inspect.signature(predict)}"
|
69 |
+
|
70 |
# Run prediction
|
71 |
+
yield "Starting prediction..."
|
72 |
+
try:
|
73 |
+
predict(
|
74 |
+
dataset_path=dataset_path,
|
75 |
+
table_meta_path=table_meta_path,
|
76 |
+
output_dir=output_dir,
|
77 |
+
prompt_format=prompt_format,
|
78 |
+
stop_tokens=stop_tokens,
|
79 |
+
max_tokens=max_tokens,
|
80 |
+
temperature=temperature,
|
81 |
+
num_beams=num_beams,
|
82 |
+
manifest_client=manifest_client,
|
83 |
+
manifest_engine=manifest_engine,
|
84 |
+
manifest_connection=manifest_connection,
|
85 |
+
overwrite_manifest=overwrite_manifest,
|
86 |
+
parallel=parallel
|
87 |
+
)
|
88 |
+
except TypeError as e:
|
89 |
+
yield f"TypeError in predict function: {str(e)}"
|
90 |
+
yield "Attempting to call predict with only expected arguments..."
|
91 |
+
# Try calling predict with only the arguments it expects
|
92 |
+
predict_args = inspect.getfullargspec(predict).args
|
93 |
+
filtered_args = {k: v for k, v in locals().items() if k in predict_args}
|
94 |
+
predict(**filtered_args)
|
95 |
+
|
96 |
results.append("Prediction completed.")
|
97 |
|
98 |
# Run evaluation
|