fractal-server 2.14.6__py3-none-any.whl → 2.14.7__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.
- fractal_server/__init__.py +1 -1
- fractal_server/app/runner/executors/slurm_common/base_slurm_runner.py +21 -0
- fractal_server/app/runner/executors/slurm_ssh/runner.py +2 -0
- fractal_server/app/runner/executors/slurm_sudo/runner.py +1 -1
- fractal_server/app/runner/v2/_slurm_ssh.py +4 -2
- fractal_server/app/runner/v2/_slurm_sudo.py +1 -1
- fractal_server/app/runner/v2/submit_workflow.py +5 -1
- {fractal_server-2.14.6.dist-info → fractal_server-2.14.7.dist-info}/METADATA +1 -1
- {fractal_server-2.14.6.dist-info → fractal_server-2.14.7.dist-info}/RECORD +12 -12
- {fractal_server-2.14.6.dist-info → fractal_server-2.14.7.dist-info}/LICENSE +0 -0
- {fractal_server-2.14.6.dist-info → fractal_server-2.14.7.dist-info}/WHEEL +0 -0
- {fractal_server-2.14.6.dist-info → fractal_server-2.14.7.dist-info}/entry_points.txt +0 -0
fractal_server/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__VERSION__ = "2.14.
|
1
|
+
__VERSION__ = "2.14.7"
|
@@ -73,6 +73,7 @@ class BaseSlurmRunner(BaseRunner):
|
|
73
73
|
jobs: dict[str, SlurmJob]
|
74
74
|
python_worker_interpreter: str
|
75
75
|
slurm_runner_type: Literal["ssh", "sudo"]
|
76
|
+
slurm_account: str | None = None
|
76
77
|
|
77
78
|
def __init__(
|
78
79
|
self,
|
@@ -83,6 +84,7 @@ class BaseSlurmRunner(BaseRunner):
|
|
83
84
|
common_script_lines: list[str] | None = None,
|
84
85
|
user_cache_dir: str | None = None,
|
85
86
|
poll_interval: int | None = None,
|
87
|
+
slurm_account: str | None = None,
|
86
88
|
):
|
87
89
|
self.slurm_runner_type = slurm_runner_type
|
88
90
|
self.root_dir_local = root_dir_local
|
@@ -91,6 +93,7 @@ class BaseSlurmRunner(BaseRunner):
|
|
91
93
|
self._check_slurm_account()
|
92
94
|
self.user_cache_dir = user_cache_dir
|
93
95
|
self.python_worker_interpreter = python_worker_interpreter
|
96
|
+
self.slurm_account = slurm_account
|
94
97
|
|
95
98
|
settings = Inject(get_settings)
|
96
99
|
|
@@ -185,6 +188,24 @@ class BaseSlurmRunner(BaseRunner):
|
|
185
188
|
) -> str:
|
186
189
|
logger.debug("[_submit_single_sbatch] START")
|
187
190
|
|
191
|
+
# Include SLURM account in `slurm_config`. Note: we make this change
|
192
|
+
# here, rather than exposing a new argument of `get_slurm_config`,
|
193
|
+
# because it's a backend-specific argument while `get_slurm_config` has
|
194
|
+
# a generic interface.
|
195
|
+
if self.slurm_account is not None:
|
196
|
+
slurm_config.account = self.slurm_account
|
197
|
+
|
198
|
+
# Include common_script_lines in extra_lines
|
199
|
+
if len(self.common_script_lines) > 0:
|
200
|
+
logger.debug(
|
201
|
+
f"Add {self.common_script_lines} to "
|
202
|
+
f"{slurm_config.extra_lines=}."
|
203
|
+
)
|
204
|
+
current_extra_lines = slurm_config.extra_lines or []
|
205
|
+
slurm_config.extra_lines = (
|
206
|
+
current_extra_lines + self.common_script_lines
|
207
|
+
)
|
208
|
+
|
188
209
|
for task in slurm_job.tasks:
|
189
210
|
# Write input file
|
190
211
|
if self.slurm_runner_type == "ssh":
|
@@ -30,6 +30,7 @@ class SlurmSSHRunner(BaseSlurmRunner):
|
|
30
30
|
user_cache_dir: str | None = None,
|
31
31
|
poll_interval: int | None = None,
|
32
32
|
# Specific
|
33
|
+
slurm_account: str | None = None,
|
33
34
|
fractal_ssh: FractalSSH,
|
34
35
|
) -> None:
|
35
36
|
"""
|
@@ -49,6 +50,7 @@ class SlurmSSHRunner(BaseSlurmRunner):
|
|
49
50
|
user_cache_dir=user_cache_dir,
|
50
51
|
poll_interval=poll_interval,
|
51
52
|
python_worker_interpreter=settings.FRACTAL_SLURM_WORKER_PYTHON,
|
53
|
+
slurm_account=slurm_account,
|
52
54
|
)
|
53
55
|
|
54
56
|
def _mkdir_local_folder(self, folder: str) -> None:
|
@@ -63,7 +63,6 @@ class SudoSlurmRunner(BaseSlurmRunner):
|
|
63
63
|
"""
|
64
64
|
|
65
65
|
self.slurm_user = slurm_user
|
66
|
-
self.slurm_account = slurm_account
|
67
66
|
settings = Inject(get_settings)
|
68
67
|
|
69
68
|
super().__init__(
|
@@ -76,6 +75,7 @@ class SudoSlurmRunner(BaseSlurmRunner):
|
|
76
75
|
python_worker_interpreter=(
|
77
76
|
settings.FRACTAL_SLURM_WORKER_PYTHON or sys.executable
|
78
77
|
),
|
78
|
+
slurm_account=slurm_account,
|
79
79
|
)
|
80
80
|
|
81
81
|
def _mkdir_local_folder(self, folder: str) -> None:
|
@@ -43,10 +43,11 @@ def process_workflow(
|
|
43
43
|
logger_name: str,
|
44
44
|
job_attribute_filters: AttributeFilters,
|
45
45
|
job_type_filters: dict[str, bool],
|
46
|
+
user_id: int,
|
47
|
+
# SLURM-ssh-specific
|
46
48
|
fractal_ssh: FractalSSH,
|
49
|
+
slurm_account: str | None = None,
|
47
50
|
worker_init: str | None = None,
|
48
|
-
user_id: int,
|
49
|
-
**kwargs, # not used
|
50
51
|
) -> None:
|
51
52
|
"""
|
52
53
|
Process workflow (SLURM backend public interface)
|
@@ -79,6 +80,7 @@ def process_workflow(
|
|
79
80
|
fractal_ssh=fractal_ssh,
|
80
81
|
root_dir_local=workflow_dir_local,
|
81
82
|
root_dir_remote=workflow_dir_remote,
|
83
|
+
slurm_account=slurm_account,
|
82
84
|
common_script_lines=worker_init,
|
83
85
|
) as runner:
|
84
86
|
execute_tasks_v2(
|
@@ -39,7 +39,7 @@ def process_workflow(
|
|
39
39
|
job_attribute_filters: AttributeFilters,
|
40
40
|
job_type_filters: dict[str, bool],
|
41
41
|
user_id: int,
|
42
|
-
#
|
42
|
+
# SLURM-sudo-specific
|
43
43
|
user_cache_dir: str | None = None,
|
44
44
|
slurm_user: str | None = None,
|
45
45
|
slurm_account: str | None = None,
|
@@ -236,6 +236,7 @@ def submit_workflow(
|
|
236
236
|
elif FRACTAL_RUNNER_BACKEND == "slurm_ssh":
|
237
237
|
logger.debug(f"ssh_user: {user_settings.ssh_username}")
|
238
238
|
logger.debug(f"base dir: {user_settings.ssh_tasks_dir}")
|
239
|
+
logger.debug(f"slurm_account: {job.slurm_account}")
|
239
240
|
logger.debug(f"worker_init: {worker_init}")
|
240
241
|
logger.debug(f"job.id: {job.id}")
|
241
242
|
logger.debug(f"job.working_dir: {job.working_dir}")
|
@@ -257,7 +258,10 @@ def submit_workflow(
|
|
257
258
|
)
|
258
259
|
elif FRACTAL_RUNNER_BACKEND == "slurm_ssh":
|
259
260
|
process_workflow = slurm_ssh_process_workflow
|
260
|
-
backend_specific_kwargs = dict(
|
261
|
+
backend_specific_kwargs = dict(
|
262
|
+
fractal_ssh=fractal_ssh,
|
263
|
+
slurm_account=job.slurm_account,
|
264
|
+
)
|
261
265
|
else:
|
262
266
|
raise RuntimeError(
|
263
267
|
f"Invalid runner backend {FRACTAL_RUNNER_BACKEND=}"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
fractal_server/__init__.py,sha256=
|
1
|
+
fractal_server/__init__.py,sha256=QNdgEt2dlH38r7d-Aic7OiWBBWoFztVFsxx5rckKHWU,23
|
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
|
@@ -78,31 +78,31 @@ fractal_server/app/runner/executors/slurm_common/__init__.py,sha256=47DEQpj8HBSa
|
|
78
78
|
fractal_server/app/runner/executors/slurm_common/_batching.py,sha256=gbHZIxt90GjUwhB9_UInwVqpX-KdxRQMDeXzUagdL3U,8816
|
79
79
|
fractal_server/app/runner/executors/slurm_common/_job_states.py,sha256=nuV-Zba38kDrRESOVB3gaGbrSPZc4q7YGichQaeqTW0,238
|
80
80
|
fractal_server/app/runner/executors/slurm_common/_slurm_config.py,sha256=Zv2l_6X1EfSHGRqcBMj2dbai_kP8hfuMfh-WoIUj0tY,15646
|
81
|
-
fractal_server/app/runner/executors/slurm_common/base_slurm_runner.py,sha256
|
81
|
+
fractal_server/app/runner/executors/slurm_common/base_slurm_runner.py,sha256=-xGJb_wc_99o-JweRr1f-ho8hSczNTWdj00jCfE1KPc,35533
|
82
82
|
fractal_server/app/runner/executors/slurm_common/get_slurm_config.py,sha256=VJNryceLzF5_fx9_lS1nGq85EW8rOQ0KrgtMATcfdQc,7271
|
83
83
|
fractal_server/app/runner/executors/slurm_common/remote.py,sha256=xWnI6WktHR_7cxUme72ztIeBb4osnbZNu6J2azWn9K8,3765
|
84
84
|
fractal_server/app/runner/executors/slurm_common/slurm_job_task_models.py,sha256=K4SdJOKsUWzDlnkb8Ug_UmTx6nBMsTqn9_oKqwE4XDI,3520
|
85
85
|
fractal_server/app/runner/executors/slurm_ssh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
86
86
|
fractal_server/app/runner/executors/slurm_ssh/run_subprocess.py,sha256=SyW6t4egvbiARph2YkFjc88Hj94fCamZVi50L7ph8VM,996
|
87
|
-
fractal_server/app/runner/executors/slurm_ssh/runner.py,sha256=
|
87
|
+
fractal_server/app/runner/executors/slurm_ssh/runner.py,sha256=fCovzTP5jrun5yRh4O67gtw3D4g2hMynQziu8pu1mk4,7872
|
88
88
|
fractal_server/app/runner/executors/slurm_ssh/tar_commands.py,sha256=g173siyv7qtjov5i-CjTVRT8d19ibK8re3RVWbsdHYA,1845
|
89
89
|
fractal_server/app/runner/executors/slurm_sudo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
90
90
|
fractal_server/app/runner/executors/slurm_sudo/_subprocess_run_as_user.py,sha256=W-FxnVcHxMGpv4zGgJVttVQoweyGgR4uBxO22QIZkp0,2576
|
91
|
-
fractal_server/app/runner/executors/slurm_sudo/runner.py,sha256=
|
91
|
+
fractal_server/app/runner/executors/slurm_sudo/runner.py,sha256=TGH6B1eRHgHjYjqN86F1V-WNAB_kp-nPo5TJ0FHwigY,5859
|
92
92
|
fractal_server/app/runner/filenames.py,sha256=lPnxKHtdRizr6FqG3zOdjDPyWA7GoaJGTtiuJV0gA8E,70
|
93
93
|
fractal_server/app/runner/set_start_and_last_task_index.py,sha256=NsioSzfEpGyo9ZKrV5KsbxeI7d5V3tE678Y3IAo5rHM,1218
|
94
94
|
fractal_server/app/runner/shutdown.py,sha256=ViSNJyXWU_iWPSDOOMGNh_iQdUFrdPh_jvf8vVKLpAo,1950
|
95
95
|
fractal_server/app/runner/task_files.py,sha256=V_7aZhu6-c6Y-0XUe-5cZVDrdnXEJhp8pQoUMtx6ko0,4041
|
96
96
|
fractal_server/app/runner/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
97
97
|
fractal_server/app/runner/v2/_local.py,sha256=tTJgABK-zAZmmRzoie_MPNTXJx_zBAXiZiiWl1CC2qo,3035
|
98
|
-
fractal_server/app/runner/v2/_slurm_ssh.py,sha256=
|
99
|
-
fractal_server/app/runner/v2/_slurm_sudo.py,sha256=
|
98
|
+
fractal_server/app/runner/v2/_slurm_ssh.py,sha256=VN89sFwqi139m9wpO1LmExIYIVhmYbEoMgtX7kLAMhE,3302
|
99
|
+
fractal_server/app/runner/v2/_slurm_sudo.py,sha256=Gvsh4tUlc1_3KdF3B7zEqs-YIntC_joLtTGSNFbKKSs,2939
|
100
100
|
fractal_server/app/runner/v2/db_tools.py,sha256=du5dKhMMFMErQXbGIgu9JvO_vtMensodyPsyDeqz1yQ,3324
|
101
101
|
fractal_server/app/runner/v2/deduplicate_list.py,sha256=IVTE4abBU1bUprFTkxrTfYKnvkNTanWQ-KWh_etiT08,645
|
102
102
|
fractal_server/app/runner/v2/merge_outputs.py,sha256=D1L4Taieq9i71SPQyNc1kMokgHh-sV_MqF3bv7QMDBc,907
|
103
103
|
fractal_server/app/runner/v2/runner.py,sha256=_34aVmm0jCaXWvixoMrY477p4c2ctwtvITIhIX0VccM,17673
|
104
104
|
fractal_server/app/runner/v2/runner_functions.py,sha256=Q9AVIR2NEBfRpfqW1wtQTTQfks_R1TnwRFBRro2fvjQ,18837
|
105
|
-
fractal_server/app/runner/v2/submit_workflow.py,sha256=
|
105
|
+
fractal_server/app/runner/v2/submit_workflow.py,sha256=AMnXdozwIGlXD55ch0_SNAG-ntKBO-QRhkbInrvsShU,13140
|
106
106
|
fractal_server/app/runner/v2/task_interface.py,sha256=V2TWBK6tbhycyMrJvFaoJ9IpuKlrLrvmjJbfNMsBBXo,2527
|
107
107
|
fractal_server/app/runner/versions.py,sha256=4BW-8Et8RVgILgpFoUJLWkEnZz53pv8hv_2ucG480ns,398
|
108
108
|
fractal_server/app/schemas/__init__.py,sha256=stURAU_t3AOBaH0HSUbV-GKhlPKngnnIMoqWc3orFyI,135
|
@@ -210,8 +210,8 @@ fractal_server/types/validators/_workflow_task_arguments_validators.py,sha256=HL
|
|
210
210
|
fractal_server/urls.py,sha256=QjIKAC1a46bCdiPMu3AlpgFbcv6a4l3ABcd5xz190Og,471
|
211
211
|
fractal_server/utils.py,sha256=FCY6HUsRnnbsWkT2kwQ2izijiHuCrCD3Kh50G0QudxE,3531
|
212
212
|
fractal_server/zip_tools.py,sha256=tqz_8f-vQ9OBRW-4OQfO6xxY-YInHTyHmZxU7U4PqZo,4885
|
213
|
-
fractal_server-2.14.
|
214
|
-
fractal_server-2.14.
|
215
|
-
fractal_server-2.14.
|
216
|
-
fractal_server-2.14.
|
217
|
-
fractal_server-2.14.
|
213
|
+
fractal_server-2.14.7.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
|
214
|
+
fractal_server-2.14.7.dist-info/METADATA,sha256=OuchiBpi477koEa1037Mif2_oDWNHdRneyBs7_Jjwuk,4243
|
215
|
+
fractal_server-2.14.7.dist-info/WHEEL,sha256=7dDg4QLnNKTvwIDR9Ac8jJaAmBC_owJrckbC0jjThyA,88
|
216
|
+
fractal_server-2.14.7.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
|
217
|
+
fractal_server-2.14.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|