Automático: draw-only option; end-to-end test covers biopsies, treatments and deaths
This commit is contained in:
+4
-4
@@ -156,11 +156,11 @@ def language_model() -> LanguageModel:
|
||||
|
||||
@router.post("/pipelines/{pipeline_id}/draft")
|
||||
def start_draft(
|
||||
pipeline_id: PipelineId, client: DagsterGraphQLClient = Depends(dagster)
|
||||
pipeline_id: PipelineId, run: bool = True, client: DagsterGraphQLClient = Depends(dagster)
|
||||
) -> dict[str, str]:
|
||||
"""Automático: starts the `draft` job, which draws the whole pipeline from its saved
|
||||
sources (the only nodes it may hold), saves it as a new version and runs it; follow it
|
||||
at /runs/{run_id}."""
|
||||
sources (the only nodes it may hold), saves it as a new version and runs it (`run`
|
||||
false: drawn and saved only); follow it at /runs/{run_id}."""
|
||||
if not config_log.latest_version(pipeline_id):
|
||||
raise HTTPException(404, detail=f"no pipeline {pipeline_id}")
|
||||
_, saved = config_log.get(pipeline_id)
|
||||
@@ -169,7 +169,7 @@ def start_draft(
|
||||
"fuentes: guárdela solo con ellas.") # fmt: skip
|
||||
if not (found := llm.status())["available"]:
|
||||
raise HTTPException(503, detail=f"El modelo de lenguaje no responde: {found['reason']}")
|
||||
config = {"ops": {"draft_pipeline": {"config": {"pipeline": pipeline_id}}}}
|
||||
config = {"ops": {"draft_pipeline": {"config": {"pipeline": pipeline_id, "run": run}}}}
|
||||
try:
|
||||
return {"run_id": client.submit_job_execution("draft", run_config=config)}
|
||||
except DagsterGraphQLClientError as e:
|
||||
|
||||
Reference in New Issue
Block a user