Skip to content

Commit

Permalink
no check condition
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurpulkit committed Nov 20, 2024
1 parent 71dce56 commit c636504
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/datapilot/core/platforms/dbt/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,16 @@ def _check_if_skipped(self, insight):
def run_llm_checks(self):
llm_checks = get_project_governance_llm_checks(self.token, self.instance_name, self.backend_url)
check_names = [check["name"] for check in llm_checks if check["alias"] not in self.config.get("disabled_insights", [])]
if len(check_names) == 0:
return {"results": []}

llm_check_results = run_project_governance_llm_checks(
self.token, self.instance_name, self.backend_url, self.manifest.json(), self.catalog.json(), check_names
self.token,
self.instance_name,
self.backend_url,
self.manifest.json() if self.manifest else "",
self.catalog.json() if self.catalog else "",
check_names,
)
return llm_check_results

Expand Down Expand Up @@ -205,10 +213,12 @@ def run(self):
unique_id=answer["unique_id"],
)
)
for key, value in llm_insights.items():
if key in reports[MODEL]:
reports[MODEL][key].extend(value)
else:
reports[MODEL][key] = value

if llm_insights:
for key, value in llm_insights.items():
if key in reports[MODEL]:
reports[MODEL][key].extend(value)
else:
reports[MODEL][key] = value

return reports

0 comments on commit c636504

Please sign in to comment.