Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/webapp/databricks.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def run_pdp_inference(
or not check_types(req.filepath_to_type.values(), SchemaType.STUDENT)
):
raise ValueError(
"run_pdp_inference() requires PDP_COURSE and PDP_COHORT type files to run."
"run_pdp_inference() requires COURSE and STUDENT type files to run."
)
w = WorkspaceClient(
host=databricks_vars["DATABRICKS_HOST_URL"],
Expand Down
7 changes: 5 additions & 2 deletions src/webapp/routers/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
ModelTable,
JobTable,
)

import traceback
import logging
from ..gcsdbutils import update_db_from_bucket

from ..gcsutil import StorageControl
Expand Down Expand Up @@ -550,9 +551,11 @@ def trigger_inference_run(
try:
res = databricks_control.run_pdp_inference(db_req)
except Exception as e:
tb = traceback.format_exc()
logging.error(f"Databricks run failure:\n{tb}")
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail="Databricks run_pdp_inference error. " + str(e),
detail=f"Databricks run_pdp_inference error. Error = {str(e)}",
) from e
triggered_timestamp = datetime.now()
job = JobTable(
Expand Down
Loading