Skip to content

Commit 922eb00

Browse files
committed
fix: ensure deployments_used & algorithms_used are initialized correctly
1 parent 3dfa86f commit 922eb00

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ami/ml/models/pipeline.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,9 @@ def save_results(
940940
pipeline, _created = Pipeline.objects.get_or_create(slug=results.pipeline, defaults={"name": results.pipeline})
941941
if _created:
942942
logger.warning(f"Pipeline choice returned by the Processing Service was not recognized! {pipeline}")
943-
algorithms_used = set()
943+
944+
algorithms_used: dict[str, Algorithm] = {}
945+
deployments_used: dict[str, Deployment] = {}
944946

945947
job_logger = logger
946948
start_time = time.time()
@@ -965,7 +967,6 @@ def save_results(
965967

966968
deployments_data = results.deployments
967969
source_images_data = results.source_images
968-
deployments_used: dict[str, Deployment] = {}
969970

970971
if not deployments_data:
971972
job_logger.warning(

0 commit comments

Comments
 (0)