|
744 | 744 | "save_node = workflow_nodes[-1]\n",
|
745 | 745 | "execution_args = []\n",
|
746 | 746 | "for idx, bbox in enumerate(bbox_list[patch_ids]):\n",
|
747 |
| - " execution_args.append({\n", |
748 |
| - " input_node: {\"bbox\": bbox, \"time_interval\": time_interval},\n", |
749 |
| - " save_node: {\"eopatch_folder\": f\"eopatch_{idx}\"},\n", |
750 |
| - " })\n", |
| 747 | + " execution_args.append(\n", |
| 748 | + " {\n", |
| 749 | + " input_node: {\"bbox\": bbox, \"time_interval\": time_interval},\n", |
| 750 | + " save_node: {\"eopatch_folder\": f\"eopatch_{idx}\"},\n", |
| 751 | + " }\n", |
| 752 | + " )\n", |
751 | 753 | "\n",
|
752 | 754 | "# Execute the workflow\n",
|
753 | 755 | "executor = EOExecutor(workflow, execution_args, save_logs=True)\n",
|
|
1329 | 1331 | "\n",
|
1330 | 1332 | "execution_args = []\n",
|
1331 | 1333 | "for idx in range(len(patch_ids)):\n",
|
1332 |
| - " execution_args.append({\n", |
1333 |
| - " workflow_nodes[0]: {\"eopatch_folder\": f\"eopatch_{idx}\"}, # load\n", |
1334 |
| - " workflow_nodes[-2]: {\"seed\": 42}, # sampling\n", |
1335 |
| - " workflow_nodes[-1]: {\"eopatch_folder\": f\"eopatch_{idx}\"}, # save\n", |
1336 |
| - " })\n", |
| 1334 | + " execution_args.append(\n", |
| 1335 | + " {\n", |
| 1336 | + " workflow_nodes[0]: {\"eopatch_folder\": f\"eopatch_{idx}\"}, # load\n", |
| 1337 | + " workflow_nodes[-2]: {\"seed\": 42}, # sampling\n", |
| 1338 | + " workflow_nodes[-1]: {\"eopatch_folder\": f\"eopatch_{idx}\"}, # save\n", |
| 1339 | + " }\n", |
| 1340 | + " )\n", |
1337 | 1341 | "\n",
|
1338 | 1342 | "executor = EOExecutor(workflow, execution_args, save_logs=True)\n",
|
1339 | 1343 | "executor.run(workers=5)\n",
|
|
2002 | 2006 | "# Create a list of execution arguments for each patch\n",
|
2003 | 2007 | "execution_args = []\n",
|
2004 | 2008 | "for i in range(len(patch_ids)):\n",
|
2005 |
| - " execution_args.append({\n", |
2006 |
| - " workflow_nodes[0]: {\"eopatch_folder\": f\"eopatch_{i}\"},\n", |
2007 |
| - " workflow_nodes[2]: {\"filename\": f\"{tiff_location}/prediction_eopatch_{i}.tiff\"},\n", |
2008 |
| - " workflow_nodes[3]: {\"eopatch_folder\": f\"eopatch_{i}\"},\n", |
2009 |
| - " })\n", |
| 2009 | + " execution_args.append(\n", |
| 2010 | + " {\n", |
| 2011 | + " workflow_nodes[0]: {\"eopatch_folder\": f\"eopatch_{i}\"},\n", |
| 2012 | + " workflow_nodes[2]: {\"filename\": f\"{tiff_location}/prediction_eopatch_{i}.tiff\"},\n", |
| 2013 | + " workflow_nodes[3]: {\"eopatch_folder\": f\"eopatch_{i}\"},\n", |
| 2014 | + " }\n", |
| 2015 | + " )\n", |
2010 | 2016 | "\n",
|
2011 | 2017 | "# Run the executor\n",
|
2012 | 2018 | "executor = EOExecutor(workflow, execution_args)\n",
|
|
0 commit comments