fractal-server 2.14.0a35__py3-none-any.whl → 2.14.0a36__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- __VERSION__ = "2.14.0a35"
1
+ __VERSION__ = "2.14.0a36"
@@ -18,6 +18,7 @@ from .merge_outputs import merge_outputs
18
18
  from .runner_functions import run_v2_task_compound
19
19
  from .runner_functions import run_v2_task_non_parallel
20
20
  from .runner_functions import run_v2_task_parallel
21
+ from .runner_functions import SubmissionOutcome
21
22
  from .task_interface import TaskOutput
22
23
  from fractal_server.app.db import get_sync_db
23
24
  from fractal_server.app.models.v2 import AccountingRecord
@@ -132,51 +133,60 @@ def execute_tasks_v2(
132
133
  history_run_id = history_run.id
133
134
 
134
135
  # TASK EXECUTION (V2)
135
- if task.type in ["non_parallel", "converter_non_parallel"]:
136
- outcomes_dict, num_tasks = run_v2_task_non_parallel(
137
- images=filtered_images,
138
- zarr_dir=zarr_dir,
139
- wftask=wftask,
140
- task=task,
141
- workflow_dir_local=workflow_dir_local,
142
- workflow_dir_remote=workflow_dir_remote,
143
- runner=runner,
144
- get_runner_config=get_runner_config,
145
- history_run_id=history_run_id,
146
- dataset_id=dataset.id,
147
- user_id=user_id,
148
- task_type=task.type,
149
- )
150
- elif task.type == "parallel":
151
- outcomes_dict, num_tasks = run_v2_task_parallel(
152
- images=filtered_images,
153
- wftask=wftask,
154
- task=task,
155
- workflow_dir_local=workflow_dir_local,
156
- workflow_dir_remote=workflow_dir_remote,
157
- runner=runner,
158
- get_runner_config=get_runner_config,
159
- history_run_id=history_run_id,
160
- dataset_id=dataset.id,
161
- user_id=user_id,
162
- )
163
- elif task.type in ["compound", "converter_compound"]:
164
- outcomes_dict, num_tasks = run_v2_task_compound(
165
- images=filtered_images,
166
- zarr_dir=zarr_dir,
167
- wftask=wftask,
168
- task=task,
169
- workflow_dir_local=workflow_dir_local,
170
- workflow_dir_remote=workflow_dir_remote,
171
- runner=runner,
172
- get_runner_config=get_runner_config,
173
- history_run_id=history_run_id,
174
- dataset_id=dataset.id,
175
- task_type=task.type,
176
- user_id=user_id,
177
- )
178
- else:
179
- raise ValueError(f"Unexpected error: Invalid {task.type=}.")
136
+ try:
137
+ if task.type in ["non_parallel", "converter_non_parallel"]:
138
+ outcomes_dict, num_tasks = run_v2_task_non_parallel(
139
+ images=filtered_images,
140
+ zarr_dir=zarr_dir,
141
+ wftask=wftask,
142
+ task=task,
143
+ workflow_dir_local=workflow_dir_local,
144
+ workflow_dir_remote=workflow_dir_remote,
145
+ runner=runner,
146
+ get_runner_config=get_runner_config,
147
+ history_run_id=history_run_id,
148
+ dataset_id=dataset.id,
149
+ user_id=user_id,
150
+ task_type=task.type,
151
+ )
152
+ elif task.type == "parallel":
153
+ outcomes_dict, num_tasks = run_v2_task_parallel(
154
+ images=filtered_images,
155
+ wftask=wftask,
156
+ task=task,
157
+ workflow_dir_local=workflow_dir_local,
158
+ workflow_dir_remote=workflow_dir_remote,
159
+ runner=runner,
160
+ get_runner_config=get_runner_config,
161
+ history_run_id=history_run_id,
162
+ dataset_id=dataset.id,
163
+ user_id=user_id,
164
+ )
165
+ elif task.type in ["compound", "converter_compound"]:
166
+ outcomes_dict, num_tasks = run_v2_task_compound(
167
+ images=filtered_images,
168
+ zarr_dir=zarr_dir,
169
+ wftask=wftask,
170
+ task=task,
171
+ workflow_dir_local=workflow_dir_local,
172
+ workflow_dir_remote=workflow_dir_remote,
173
+ runner=runner,
174
+ get_runner_config=get_runner_config,
175
+ history_run_id=history_run_id,
176
+ dataset_id=dataset.id,
177
+ task_type=task.type,
178
+ user_id=user_id,
179
+ )
180
+ else:
181
+ raise ValueError(f"Unexpected error: Invalid {task.type=}.")
182
+ except Exception as e:
183
+ outcomes_dict = {
184
+ 0: SubmissionOutcome(
185
+ result=None,
186
+ exception=e,
187
+ )
188
+ }
189
+ num_tasks = 0
180
190
 
181
191
  # POST TASK EXECUTION
182
192
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: fractal-server
3
- Version: 2.14.0a35
3
+ Version: 2.14.0a36
4
4
  Summary: Backend component of the Fractal analytics platform
5
5
  License: BSD-3-Clause
6
6
  Author: Tommaso Comparin
@@ -1,4 +1,4 @@
1
- fractal_server/__init__.py,sha256=uaL7SX1hlVu1EXJeVBSkUeSUZpES1i7jDygIA1DFLN0,26
1
+ fractal_server/__init__.py,sha256=8fGTYA0v4yFRsbsrwIUxQDcJEeH1hYIY2CuXgnou2hM,26
2
2
  fractal_server/__main__.py,sha256=rkM8xjY1KeS3l63irB8yCrlVobR-73uDapC4wvrIlxI,6957
3
3
  fractal_server/alembic.ini,sha256=MWwi7GzjzawI9cCAK1LW7NxIBQDUqD12-ptJoq5JpP0,3153
4
4
  fractal_server/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -101,7 +101,7 @@ fractal_server/app/runner/v2/_slurm_sudo.py,sha256=TVihkQKMX6YWEWxXJjQo0WEQOjVy7
101
101
  fractal_server/app/runner/v2/db_tools.py,sha256=du5dKhMMFMErQXbGIgu9JvO_vtMensodyPsyDeqz1yQ,3324
102
102
  fractal_server/app/runner/v2/deduplicate_list.py,sha256=IVTE4abBU1bUprFTkxrTfYKnvkNTanWQ-KWh_etiT08,645
103
103
  fractal_server/app/runner/v2/merge_outputs.py,sha256=D1L4Taieq9i71SPQyNc1kMokgHh-sV_MqF3bv7QMDBc,907
104
- fractal_server/app/runner/v2/runner.py,sha256=DUJxltI91v0efnTaTEFCQp7CV5Mtz2KEE0rezJt4mHY,15805
104
+ fractal_server/app/runner/v2/runner.py,sha256=UmUhAOOcwAT-8b28o5bWn5S9APtr5EbEvulxWJPo6r4,16269
105
105
  fractal_server/app/runner/v2/runner_functions.py,sha256=AzsE7VF6NMz_5qc0htQkfow5_2rr-wkx50vFJTndj8I,19250
106
106
  fractal_server/app/runner/v2/runner_functions_low_level.py,sha256=_h_OOffq3d7V0uHa8Uvs0mj31y1GSZBUXjDDF3WjVjY,3620
107
107
  fractal_server/app/runner/v2/submit_workflow.py,sha256=QywUGIoHAHnrWgfnyX8W9kVqKY-RvVyNLpzrbsXZOZ4,13075
@@ -209,8 +209,8 @@ fractal_server/tasks/v2/utils_templates.py,sha256=Kc_nSzdlV6KIsO0CQSPs1w70zLyENP
209
209
  fractal_server/urls.py,sha256=QjIKAC1a46bCdiPMu3AlpgFbcv6a4l3ABcd5xz190Og,471
210
210
  fractal_server/utils.py,sha256=PMwrxWFxRTQRl1b9h-NRIbFGPKqpH_hXnkAT3NfZdpY,3571
211
211
  fractal_server/zip_tools.py,sha256=GjDgo_sf6V_DDg6wWeBlZu5zypIxycn_l257p_YVKGc,4876
212
- fractal_server-2.14.0a35.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
213
- fractal_server-2.14.0a35.dist-info/METADATA,sha256=_zw2Yj6UEBCiw25HwYUZ8Pp5FVQyVFP1NyYqrmmHPjQ,4563
214
- fractal_server-2.14.0a35.dist-info/WHEEL,sha256=7dDg4QLnNKTvwIDR9Ac8jJaAmBC_owJrckbC0jjThyA,88
215
- fractal_server-2.14.0a35.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
216
- fractal_server-2.14.0a35.dist-info/RECORD,,
212
+ fractal_server-2.14.0a36.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
213
+ fractal_server-2.14.0a36.dist-info/METADATA,sha256=5MOzziccWO5Ah9boFwgKLEMgJKoZbRLwHQvhcj4T0-w,4563
214
+ fractal_server-2.14.0a36.dist-info/WHEEL,sha256=7dDg4QLnNKTvwIDR9Ac8jJaAmBC_owJrckbC0jjThyA,88
215
+ fractal_server-2.14.0a36.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
216
+ fractal_server-2.14.0a36.dist-info/RECORD,,