Skip to content

Commit a74dbf5

Browse files
author
Julian de Ruiter
committed
Fix double function.
1 parent a796552 commit a74dbf5

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

chapters/chapter5/dags/chapter5_08_xcoms.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,10 @@ def _deploy_model(**context):
3434

3535
join_datasets = DummyOperator(task_id="join_datasets")
3636

37-
def _train_model(**context):
38-
model_id = str(uuid.uuid4())
39-
context["task_instance"].xcom_push(key="return_value", value=model_id)
40-
4137
train_model = PythonOperator(
4238
task_id="train_model", python_callable=_train_model, provide_context=True,
4339
)
4440

45-
def _deploy_model(**context):
46-
model_id = context["task_instance"].xcom_pull(
47-
task_ids="train_model", key="model_id"
48-
)
49-
print(f"Deploying model {model_id}")
50-
5141
deploy_model = PythonOperator(
5242
task_id="deploy_model", python_callable=_deploy_model, provide_context=True,
5343
)

0 commit comments

Comments
 (0)