fractal-server 2.14.0a9__py3-none-any.whl → 2.14.0a11__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/models/v2/dataset.py +0 -10
- fractal_server/app/models/v2/job.py +3 -0
- fractal_server/app/routes/api/v2/__init__.py +2 -0
- fractal_server/app/routes/api/v2/history.py +14 -9
- fractal_server/app/routes/api/v2/images.py +5 -2
- fractal_server/app/routes/api/v2/submit.py +16 -14
- fractal_server/app/routes/api/v2/verify_image_types.py +64 -0
- fractal_server/app/routes/api/v2/workflow.py +11 -7
- fractal_server/app/runner/components.py +0 -3
- fractal_server/app/runner/exceptions.py +4 -0
- fractal_server/app/runner/executors/base_runner.py +16 -17
- fractal_server/app/runner/executors/local/{_local_config.py → get_local_config.py} +0 -7
- fractal_server/app/runner/executors/local/runner.py +117 -58
- fractal_server/app/runner/executors/{slurm_sudo → slurm_common}/_check_jobs_status.py +4 -0
- fractal_server/app/runner/executors/slurm_ssh/_check_job_status_ssh.py +67 -0
- fractal_server/app/runner/executors/slurm_ssh/executor.py +7 -5
- fractal_server/app/runner/executors/slurm_ssh/runner.py +707 -0
- fractal_server/app/runner/executors/slurm_sudo/runner.py +265 -114
- fractal_server/app/runner/task_files.py +8 -0
- fractal_server/app/runner/v2/__init__.py +0 -365
- fractal_server/app/runner/v2/_local.py +4 -2
- fractal_server/app/runner/v2/_slurm_ssh.py +4 -2
- fractal_server/app/runner/v2/_slurm_sudo.py +4 -2
- fractal_server/app/runner/v2/db_tools.py +87 -0
- fractal_server/app/runner/v2/runner.py +83 -89
- fractal_server/app/runner/v2/runner_functions.py +279 -436
- fractal_server/app/runner/v2/runner_functions_low_level.py +37 -39
- fractal_server/app/runner/v2/submit_workflow.py +366 -0
- fractal_server/app/runner/v2/task_interface.py +31 -0
- fractal_server/app/schemas/v2/dataset.py +4 -71
- fractal_server/app/schemas/v2/dumps.py +6 -5
- fractal_server/app/schemas/v2/job.py +6 -3
- fractal_server/migrations/versions/47351f8c7ebc_drop_dataset_filters.py +50 -0
- fractal_server/migrations/versions/e81103413827_add_job_type_filters.py +36 -0
- {fractal_server-2.14.0a9.dist-info → fractal_server-2.14.0a11.dist-info}/METADATA +1 -1
- {fractal_server-2.14.0a9.dist-info → fractal_server-2.14.0a11.dist-info}/RECORD +40 -36
- fractal_server/app/runner/executors/local/_submit_setup.py +0 -46
- fractal_server/app/runner/executors/slurm_common/_submit_setup.py +0 -84
- fractal_server/app/runner/v2/_db_tools.py +0 -48
- {fractal_server-2.14.0a9.dist-info → fractal_server-2.14.0a11.dist-info}/LICENSE +0 -0
- {fractal_server-2.14.0a9.dist-info → fractal_server-2.14.0a11.dist-info}/WHEEL +0 -0
- {fractal_server-2.14.0a9.dist-info → fractal_server-2.14.0a11.dist-info}/entry_points.txt +0 -0
@@ -15,7 +15,6 @@ from pydantic import Field
|
|
15
15
|
|
16
16
|
from .task import TaskTypeType
|
17
17
|
from .task_group import TaskGroupV2OriginEnum
|
18
|
-
from fractal_server.images.models import AttributeFiltersType
|
19
18
|
|
20
19
|
|
21
20
|
class ProjectDumpV2(BaseModel):
|
@@ -65,15 +64,17 @@ class WorkflowDumpV2(BaseModel):
|
|
65
64
|
|
66
65
|
|
67
66
|
class DatasetDumpV2(BaseModel):
|
68
|
-
|
67
|
+
"""
|
68
|
+
We do not include 'model_config = ConfigDict(extra="forbid")' because
|
69
|
+
legacy data may include 'type_filters' or 'attribute_filters' and we
|
70
|
+
want to avoid response-validation errors.
|
71
|
+
"""
|
72
|
+
|
69
73
|
id: int
|
70
74
|
name: str
|
71
75
|
project_id: int
|
72
76
|
timestamp_created: str
|
73
|
-
|
74
77
|
zarr_dir: str
|
75
|
-
type_filters: dict[str, bool]
|
76
|
-
attribute_filters: AttributeFiltersType
|
77
78
|
|
78
79
|
|
79
80
|
class TaskGroupDumpV2(BaseModel):
|
@@ -13,6 +13,7 @@ from pydantic.types import AwareDatetime
|
|
13
13
|
from pydantic.types import StrictStr
|
14
14
|
|
15
15
|
from .._filter_validators import validate_attribute_filters
|
16
|
+
from .._filter_validators import validate_type_filters
|
16
17
|
from .._validators import cant_set_none
|
17
18
|
from .._validators import NonEmptyString
|
18
19
|
from .._validators import root_validate_dict_keys
|
@@ -44,7 +45,6 @@ class JobStatusTypeV2(str, Enum):
|
|
44
45
|
|
45
46
|
|
46
47
|
class JobCreateV2(BaseModel):
|
47
|
-
|
48
48
|
model_config = ConfigDict(extra="forbid")
|
49
49
|
|
50
50
|
first_task_index: Optional[int] = None
|
@@ -53,6 +53,7 @@ class JobCreateV2(BaseModel):
|
|
53
53
|
worker_init: Optional[NonEmptyString] = None
|
54
54
|
|
55
55
|
attribute_filters: AttributeFiltersType = Field(default_factory=dict)
|
56
|
+
type_filters: dict[str, bool] = Field(default_factory=dict)
|
56
57
|
|
57
58
|
# Validators
|
58
59
|
|
@@ -67,6 +68,9 @@ class JobCreateV2(BaseModel):
|
|
67
68
|
_attribute_filters = field_validator("attribute_filters")(
|
68
69
|
classmethod(validate_attribute_filters)
|
69
70
|
)
|
71
|
+
_type_filters = field_validator("type_filters")(
|
72
|
+
classmethod(validate_type_filters)
|
73
|
+
)
|
70
74
|
|
71
75
|
@field_validator("first_task_index")
|
72
76
|
@classmethod
|
@@ -104,7 +108,6 @@ class JobCreateV2(BaseModel):
|
|
104
108
|
|
105
109
|
|
106
110
|
class JobReadV2(BaseModel):
|
107
|
-
|
108
111
|
id: int
|
109
112
|
project_id: Optional[int] = None
|
110
113
|
project_dump: ProjectDumpV2
|
@@ -124,6 +127,7 @@ class JobReadV2(BaseModel):
|
|
124
127
|
last_task_index: Optional[int] = None
|
125
128
|
worker_init: Optional[str] = None
|
126
129
|
attribute_filters: AttributeFiltersType
|
130
|
+
type_filters: dict[str, bool]
|
127
131
|
|
128
132
|
@field_serializer("start_timestamp")
|
129
133
|
def serialize_datetime_start(v: datetime) -> str:
|
@@ -138,7 +142,6 @@ class JobReadV2(BaseModel):
|
|
138
142
|
|
139
143
|
|
140
144
|
class JobUpdateV2(BaseModel):
|
141
|
-
|
142
145
|
model_config = ConfigDict(extra="forbid")
|
143
146
|
|
144
147
|
status: JobStatusTypeV2
|
@@ -0,0 +1,50 @@
|
|
1
|
+
"""Drop dataset filters
|
2
|
+
|
3
|
+
Revision ID: 47351f8c7ebc
|
4
|
+
Revises: fbce16ff4e47
|
5
|
+
Create Date: 2025-03-26 11:10:17.869028
|
6
|
+
|
7
|
+
"""
|
8
|
+
import sqlalchemy as sa
|
9
|
+
from alembic import op
|
10
|
+
from sqlalchemy.dialects import postgresql
|
11
|
+
|
12
|
+
# revision identifiers, used by Alembic.
|
13
|
+
revision = "47351f8c7ebc"
|
14
|
+
down_revision = "fbce16ff4e47"
|
15
|
+
branch_labels = None
|
16
|
+
depends_on = None
|
17
|
+
|
18
|
+
|
19
|
+
def upgrade() -> None:
|
20
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
21
|
+
with op.batch_alter_table("datasetv2", schema=None) as batch_op:
|
22
|
+
batch_op.drop_column("type_filters")
|
23
|
+
batch_op.drop_column("attribute_filters")
|
24
|
+
|
25
|
+
# ### end Alembic commands ###
|
26
|
+
|
27
|
+
|
28
|
+
def downgrade() -> None:
|
29
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
30
|
+
with op.batch_alter_table("datasetv2", schema=None) as batch_op:
|
31
|
+
batch_op.add_column(
|
32
|
+
sa.Column(
|
33
|
+
"attribute_filters",
|
34
|
+
postgresql.JSON(astext_type=sa.Text()),
|
35
|
+
server_default=sa.text("'{}'::json"),
|
36
|
+
autoincrement=False,
|
37
|
+
nullable=False,
|
38
|
+
)
|
39
|
+
)
|
40
|
+
batch_op.add_column(
|
41
|
+
sa.Column(
|
42
|
+
"type_filters",
|
43
|
+
postgresql.JSON(astext_type=sa.Text()),
|
44
|
+
server_default=sa.text("'{}'::json"),
|
45
|
+
autoincrement=False,
|
46
|
+
nullable=False,
|
47
|
+
)
|
48
|
+
)
|
49
|
+
|
50
|
+
# ### end Alembic commands ###
|
@@ -0,0 +1,36 @@
|
|
1
|
+
"""Add job.type_filters
|
2
|
+
|
3
|
+
Revision ID: e81103413827
|
4
|
+
Revises: 47351f8c7ebc
|
5
|
+
Create Date: 2025-03-26 11:10:41.748248
|
6
|
+
|
7
|
+
"""
|
8
|
+
import sqlalchemy as sa
|
9
|
+
from alembic import op
|
10
|
+
|
11
|
+
|
12
|
+
# revision identifiers, used by Alembic.
|
13
|
+
revision = "e81103413827"
|
14
|
+
down_revision = "47351f8c7ebc"
|
15
|
+
branch_labels = None
|
16
|
+
depends_on = None
|
17
|
+
|
18
|
+
|
19
|
+
def upgrade() -> None:
|
20
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
21
|
+
with op.batch_alter_table("jobv2", schema=None) as batch_op:
|
22
|
+
batch_op.add_column(
|
23
|
+
sa.Column(
|
24
|
+
"type_filters", sa.JSON(), server_default="{}", nullable=False
|
25
|
+
)
|
26
|
+
)
|
27
|
+
|
28
|
+
# ### end Alembic commands ###
|
29
|
+
|
30
|
+
|
31
|
+
def downgrade() -> None:
|
32
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
33
|
+
with op.batch_alter_table("jobv2", schema=None) as batch_op:
|
34
|
+
batch_op.drop_column("type_filters")
|
35
|
+
|
36
|
+
# ### end Alembic commands ###
|
@@ -1,4 +1,4 @@
|
|
1
|
-
fractal_server/__init__.py,sha256=
|
1
|
+
fractal_server/__init__.py,sha256=GtuXF0xAIDTX9AXSJY7o0G6jQtfGliAzZf-nkCVjhSg,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
|
@@ -11,9 +11,9 @@ fractal_server/app/models/security.py,sha256=mMb_HiwWY74QZrs9xuyno0CVSmk4GYQWk5F
|
|
11
11
|
fractal_server/app/models/user_settings.py,sha256=Y-ZV-uZAFLZqXxy8c5_Qeh_F7zQuZDWOgLpU6Zs6iqU,1316
|
12
12
|
fractal_server/app/models/v2/__init__.py,sha256=vjHwek7-IXmaZZL9VF0nD30YL9ca4wNc8P4RXJK_kDc,832
|
13
13
|
fractal_server/app/models/v2/accounting.py,sha256=f2ALxfKKBNxFLJTtC2-YqRepVK253x68y7zkD2V_Nls,1115
|
14
|
-
fractal_server/app/models/v2/dataset.py,sha256=
|
14
|
+
fractal_server/app/models/v2/dataset.py,sha256=ld8MruHCThSXVW2IYv7VqEljBsiWoctpaqkAOLlLSaU,1220
|
15
15
|
fractal_server/app/models/v2/history.py,sha256=C0pqn_S5yqc8PjayoyRNcsk5Mt_SxvHitdQznuxJvGM,2044
|
16
|
-
fractal_server/app/models/v2/job.py,sha256=
|
16
|
+
fractal_server/app/models/v2/job.py,sha256=6DMc0wehg0blhteHcEOUCSrCpNsUwqbWGb3gu_64ACo,1961
|
17
17
|
fractal_server/app/models/v2/project.py,sha256=rAHoh5KfYwIaW7rTX0_O0jvWmxEvfo1BafvmcXuSSRk,786
|
18
18
|
fractal_server/app/models/v2/task.py,sha256=8KEROaadgccXRZIP7EriBp2j1FgzYkgiirOi5_fG79M,1494
|
19
19
|
fractal_server/app/models/v2/task_group.py,sha256=f-JiqAQAmXP2LOVKQM7Yq3qcEjI1KA-HFYsyLpBASGs,3499
|
@@ -30,24 +30,25 @@ fractal_server/app/routes/admin/v2/task.py,sha256=QOwgyDU9m7T_wLMwkdgfFaoMjNxcDg
|
|
30
30
|
fractal_server/app/routes/admin/v2/task_group.py,sha256=XTjdqgABXZcx9EenaoqSmHh12BXSentUus3SV0oxBMs,7929
|
31
31
|
fractal_server/app/routes/admin/v2/task_group_lifecycle.py,sha256=0e0ZJ_k75TVHaT2o8Xk33DPDSgh-eBhZf-y4y7t-Adg,9429
|
32
32
|
fractal_server/app/routes/api/__init__.py,sha256=B8l6PSAhR10iZqHEiyTat-_0tkeKdrCigIE6DJGP5b8,638
|
33
|
-
fractal_server/app/routes/api/v2/__init__.py,sha256=
|
33
|
+
fractal_server/app/routes/api/v2/__init__.py,sha256=9o9zxTU2IJrC_JQ8GUMft3niiBZ39YLvODUeraiRRdQ,2465
|
34
34
|
fractal_server/app/routes/api/v2/_aux_functions.py,sha256=eE-TdEMI_UX3LBDUGwjG5NyUcihDVaHYlG15NlTJ9DI,12872
|
35
35
|
fractal_server/app/routes/api/v2/_aux_functions_history.py,sha256=nWO4jBoL3MWuMMwS-6TwxlTHzgRr8Xed30RSeetLvP8,4199
|
36
36
|
fractal_server/app/routes/api/v2/_aux_functions_task_lifecycle.py,sha256=qdXCb6IP8-qPEAxGZKljtjIqNzIAyRaAsQSRi5VqFHM,6773
|
37
37
|
fractal_server/app/routes/api/v2/_aux_functions_tasks.py,sha256=uhNSs-jcS7ndIUFKiOC1yrDiViw3uvKEXi9UL04BMks,11642
|
38
38
|
fractal_server/app/routes/api/v2/dataset.py,sha256=osoWJIA5SZH4aAr-0TG6Uc3877wzsgCLB_Oek59hRjk,9230
|
39
|
-
fractal_server/app/routes/api/v2/history.py,sha256=
|
40
|
-
fractal_server/app/routes/api/v2/images.py,sha256=
|
39
|
+
fractal_server/app/routes/api/v2/history.py,sha256=DvIor59lWTgQ76EUJD-jPItIPKKHBvwFoZ7QPb93hc0,13285
|
40
|
+
fractal_server/app/routes/api/v2/images.py,sha256=R0ccsHMeMyvZ3Sh23zGXyfqniMFOTVmwNWMzaQxc6t8,8239
|
41
41
|
fractal_server/app/routes/api/v2/job.py,sha256=MU1sHIKk_89WrD0TD44d4ufzqnywot7On_W71KjyUbQ,6500
|
42
42
|
fractal_server/app/routes/api/v2/project.py,sha256=hMvL9QLPUcAAiPGy6ta2LBLTVRozJsfvBPl5D06_MHg,6666
|
43
43
|
fractal_server/app/routes/api/v2/status_legacy.py,sha256=Q5ZWQNfeZKL8Xgtou2Xr80iaF1uO-r4oSKgq5H42V_8,6349
|
44
|
-
fractal_server/app/routes/api/v2/submit.py,sha256=
|
44
|
+
fractal_server/app/routes/api/v2/submit.py,sha256=hCwwC6bXP7EyhgGyVLv1ClybRH1YytDVoPunOzpsf0s,8822
|
45
45
|
fractal_server/app/routes/api/v2/task.py,sha256=O7pquZhXIS4lRs5XqHvstiwe8BiCuS-B3ZKJI1g6EJU,6985
|
46
46
|
fractal_server/app/routes/api/v2/task_collection.py,sha256=IDNF6sjDuU37HIQ0TuQA-TZIuf7nfHAQXUUNmkrlhLM,12706
|
47
47
|
fractal_server/app/routes/api/v2/task_collection_custom.py,sha256=cctW61-C2QYF2KXluS15lLhZJS_kt30Ca6UGLFO32z0,6207
|
48
48
|
fractal_server/app/routes/api/v2/task_group.py,sha256=j3zDvVZizB7NWEgVgZU42JCXETkaVkk2ImJPr0jS7BQ,8164
|
49
49
|
fractal_server/app/routes/api/v2/task_group_lifecycle.py,sha256=3o9bCC8ubMwffQPPaxQZy-CjH9IB2RkIReIecI6L2_w,9300
|
50
|
-
fractal_server/app/routes/api/v2/
|
50
|
+
fractal_server/app/routes/api/v2/verify_image_types.py,sha256=IOB96X3_FYBd9L_QiyVSEoV13ZP7YGS4WlBIDA1Op4I,1979
|
51
|
+
fractal_server/app/routes/api/v2/workflow.py,sha256=dVXVuEajW8acmaFyr_yWYhG_qnbqkm1UqjDoGWf4bZ0,10568
|
51
52
|
fractal_server/app/routes/api/v2/workflow_import.py,sha256=INmnhlMEBJp-vHPR0f940DANPmIidts3OfcooeM_aNA,11205
|
52
53
|
fractal_server/app/routes/api/v2/workflowtask.py,sha256=7_syX2EO7ibF6Xkm7HBPhsUYq6aYnKNeC5iSaafQhG4,11342
|
53
54
|
fractal_server/app/routes/auth/__init__.py,sha256=fao6CS0WiAjHDTvBzgBVV_bSXFpEAeDBF6Z6q7rRkPc,1658
|
@@ -65,48 +66,49 @@ fractal_server/app/routes/aux/_runner.py,sha256=spNudutueHTBJPhm55RlOuYzb31Dhyhe
|
|
65
66
|
fractal_server/app/routes/aux/validate_user_settings.py,sha256=FLVi__8YFcm_6c_K5uMQo7raWWXQLBcZtx8yaPO4jaE,2301
|
66
67
|
fractal_server/app/routes/pagination.py,sha256=L8F5JqekF39qz-LpeScdlhb57MQnSRXjK4ZEtsZqYLk,1210
|
67
68
|
fractal_server/app/runner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
68
|
-
fractal_server/app/runner/components.py,sha256
|
69
|
+
fractal_server/app/runner/components.py,sha256=-Ii5l8d_V6f5DFOd-Zsr8VYmOsyqw0Hox9fEFQiuqxY,66
|
69
70
|
fractal_server/app/runner/compress_folder.py,sha256=HSc1tv7x2DBjBoXwugZlC79rm9GNBIWtQKK9yWn5ZBI,3991
|
70
|
-
fractal_server/app/runner/exceptions.py,sha256=
|
71
|
+
fractal_server/app/runner/exceptions.py,sha256=JC5ufHyeA1hYD_rkZUscI30DD8D903ncag7Z3AArmUY,4215
|
71
72
|
fractal_server/app/runner/executors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
72
|
-
fractal_server/app/runner/executors/base_runner.py,sha256=
|
73
|
+
fractal_server/app/runner/executors/base_runner.py,sha256=WhS7MLOkSHy8vjrGZGRHkounziJoYsqUlPkAdUQIs44,4511
|
73
74
|
fractal_server/app/runner/executors/local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
74
|
-
fractal_server/app/runner/executors/local/
|
75
|
-
fractal_server/app/runner/executors/local/
|
76
|
-
fractal_server/app/runner/executors/local/runner.py,sha256=LNql8q6M-Cn_hEV4IMkNP57XFPQJ6eaVd0YIDKJLk60,5621
|
75
|
+
fractal_server/app/runner/executors/local/get_local_config.py,sha256=wbrIYuGOvABOStrE7jNrC4ULPhtBQ5Q7Y3aKm_icomg,3508
|
76
|
+
fractal_server/app/runner/executors/local/runner.py,sha256=KHmG6tw1TCb1HLtUhUC4FYcK_OdJk-SDdXtLkX_G4-4,7939
|
77
77
|
fractal_server/app/runner/executors/slurm_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
78
78
|
fractal_server/app/runner/executors/slurm_common/_batching.py,sha256=ZY020JZlDS5mfpgpWTChQkyHU7iLE5kx2HVd57_C6XA,8850
|
79
|
+
fractal_server/app/runner/executors/slurm_common/_check_jobs_status.py,sha256=bzpqx8mxT-2xRIGQK6YLMIvMN-SM6OeYWUs97W0iRno,2103
|
79
80
|
fractal_server/app/runner/executors/slurm_common/_job_states.py,sha256=nuV-Zba38kDrRESOVB3gaGbrSPZc4q7YGichQaeqTW0,238
|
80
81
|
fractal_server/app/runner/executors/slurm_common/_slurm_config.py,sha256=fZaFUUXqDH0p3DndCFUpFqTqyD2tMVCuSYgYLAycpVw,15897
|
81
|
-
fractal_server/app/runner/executors/slurm_common/_submit_setup.py,sha256=crbfAAvXbxe_9PaokXkkVdPV65lSCFbInZ0RlT6uyHI,2746
|
82
82
|
fractal_server/app/runner/executors/slurm_common/get_slurm_config.py,sha256=-fAX1DZMB5RZnyYanIJD72mWOJAPkh21jd4loDXKJw4,5994
|
83
83
|
fractal_server/app/runner/executors/slurm_common/remote.py,sha256=iXLu4d-bWzn7qmDaOjKFkcuaSHLjPESAMSLcg6c99fc,5852
|
84
84
|
fractal_server/app/runner/executors/slurm_common/utils_executors.py,sha256=naPyJI0I3lD-sYHbSXbMFGUBK4h_SggA5V91Z1Ch1Xg,1416
|
85
85
|
fractal_server/app/runner/executors/slurm_ssh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
86
|
+
fractal_server/app/runner/executors/slurm_ssh/_check_job_status_ssh.py,sha256=81e4kYpnNlONUw0a3o0o5kTu35Dshelc61y6Gf63m2M,1899
|
86
87
|
fractal_server/app/runner/executors/slurm_ssh/_executor_wait_thread.py,sha256=lnW8dNNPqqbpQvojVBQaNJm4wN3Qkw02RWBZ1w68Hyw,3755
|
87
88
|
fractal_server/app/runner/executors/slurm_ssh/_slurm_job.py,sha256=IL1C52dezEiincVX2yKryNiPHi4YOMURNLdQO_QPdGw,4406
|
88
|
-
fractal_server/app/runner/executors/slurm_ssh/executor.py,sha256=
|
89
|
+
fractal_server/app/runner/executors/slurm_ssh/executor.py,sha256=StEX6vN9jY79nTxqRDb5OEhkTVd3jYhT4X0_luZSqd4,53678
|
90
|
+
fractal_server/app/runner/executors/slurm_ssh/runner.py,sha256=LON7H3RGPYwqmDj0gEcPg7CtBGQzClU8o0fubsXk-Rw,24482
|
89
91
|
fractal_server/app/runner/executors/slurm_sudo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
90
|
-
fractal_server/app/runner/executors/slurm_sudo/_check_jobs_status.py,sha256=eZd9lxbObsqc1M3B96IGMJ-1oC0jo8lBOX4Nto97VvE,2036
|
91
92
|
fractal_server/app/runner/executors/slurm_sudo/_subprocess_run_as_user.py,sha256=O1bNg1DiSDJmQE0RmOk2Ii47DagiXp5ryd0R6KxO2OM,3177
|
92
|
-
fractal_server/app/runner/executors/slurm_sudo/runner.py,sha256=
|
93
|
+
fractal_server/app/runner/executors/slurm_sudo/runner.py,sha256=hjHn09Gvw1xZ-mmSRRaye-0-JInA-YhM45ohCZ_8WYY,27911
|
93
94
|
fractal_server/app/runner/extract_archive.py,sha256=tLpjDrX47OjTNhhoWvm6iNukg8KoieWyTb7ZfvE9eWU,2483
|
94
95
|
fractal_server/app/runner/filenames.py,sha256=lPnxKHtdRizr6FqG3zOdjDPyWA7GoaJGTtiuJV0gA8E,70
|
95
96
|
fractal_server/app/runner/run_subprocess.py,sha256=c3JbYXq3hX2aaflQU19qJ5Xs6J6oXGNvnTEoAfv2bxc,959
|
96
97
|
fractal_server/app/runner/set_start_and_last_task_index.py,sha256=-q4zVybAj8ek2XlbENKlfOAJ39hT_zoJoZkqzDqiAMY,1254
|
97
98
|
fractal_server/app/runner/shutdown.py,sha256=9pfSKHDNdIcm0eY-opgRTi7y0HmvfPmYiu9JR6Idark,2082
|
98
|
-
fractal_server/app/runner/task_files.py,sha256=
|
99
|
-
fractal_server/app/runner/v2/__init__.py,sha256=
|
100
|
-
fractal_server/app/runner/v2/
|
101
|
-
fractal_server/app/runner/v2/
|
102
|
-
fractal_server/app/runner/v2/
|
103
|
-
fractal_server/app/runner/v2/
|
99
|
+
fractal_server/app/runner/task_files.py,sha256=pGqaFsSXg-3kywf_FGqgjx_8pPLwIn0MpjQ3009fkus,2741
|
100
|
+
fractal_server/app/runner/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
101
|
+
fractal_server/app/runner/v2/_local.py,sha256=DK8yagbvd6HHjcDVhUzTy0f7MURlTkQha-NM6OZKgJc,3044
|
102
|
+
fractal_server/app/runner/v2/_slurm_ssh.py,sha256=RhfV1quXGGU4bYioRF7UKAdrzOI_stgsFdXdcTegrv0,3310
|
103
|
+
fractal_server/app/runner/v2/_slurm_sudo.py,sha256=vjvOA-6_0vSKp704wM1O0ubEDpKZZ0vJG5ZfUi9-wSA,2997
|
104
|
+
fractal_server/app/runner/v2/db_tools.py,sha256=yPF2KgkrEdvAc380YL-wux68O0Ej9cY-usTSd-m_evE,2400
|
104
105
|
fractal_server/app/runner/v2/deduplicate_list.py,sha256=IVTE4abBU1bUprFTkxrTfYKnvkNTanWQ-KWh_etiT08,645
|
105
106
|
fractal_server/app/runner/v2/merge_outputs.py,sha256=D1L4Taieq9i71SPQyNc1kMokgHh-sV_MqF3bv7QMDBc,907
|
106
|
-
fractal_server/app/runner/v2/runner.py,sha256=
|
107
|
-
fractal_server/app/runner/v2/runner_functions.py,sha256=
|
108
|
-
fractal_server/app/runner/v2/runner_functions_low_level.py,sha256=
|
109
|
-
fractal_server/app/runner/v2/
|
107
|
+
fractal_server/app/runner/v2/runner.py,sha256=tCBGtUjExhlAplFLw3AlxEr7NZmpAj9QIwSh2xstIO8,15153
|
108
|
+
fractal_server/app/runner/v2/runner_functions.py,sha256=xnc1rpuECwUEDuD4oLF7PpyenHUe3kTVD41xjZa2r_0,16490
|
109
|
+
fractal_server/app/runner/v2/runner_functions_low_level.py,sha256=9t1CHN3EyfsGRWfG257YPY5WjQ6zuztsw_KZrpEAFPo,3703
|
110
|
+
fractal_server/app/runner/v2/submit_workflow.py,sha256=PTLXNT_ZoEd9GTZ5C4Ai0imOFJOfY4E9Yg1rB-gsl7I,13340
|
111
|
+
fractal_server/app/runner/v2/task_interface.py,sha256=IXdQTI8rXFgXv1Ez0js4CjKFf3QwO2GCHRTuwiFtiTQ,2891
|
110
112
|
fractal_server/app/runner/versions.py,sha256=dSaPRWqmFPHjg20kTCHmi_dmGNcCETflDtDLronNanU,852
|
111
113
|
fractal_server/app/schemas/__init__.py,sha256=stURAU_t3AOBaH0HSUbV-GKhlPKngnnIMoqWc3orFyI,135
|
112
114
|
fractal_server/app/schemas/_filter_validators.py,sha256=Gkf2USrkuxZx1TWeeMRmhgfmG60AAIDQfbaWslLsvJQ,1572
|
@@ -116,10 +118,10 @@ fractal_server/app/schemas/user_group.py,sha256=Uao1igRYflBu7Dg6Zs0kaFU3zBFJzIwD
|
|
116
118
|
fractal_server/app/schemas/user_settings.py,sha256=z7hx54yTrWfjo98oX_1lkeRh1UGrC1dSRH6yIOpnCsY,2772
|
117
119
|
fractal_server/app/schemas/v2/__init__.py,sha256=Q1Sozuh6escPbU3SIsmiJbQMFl9kfIcfK-3Ctb-1wXQ,2988
|
118
120
|
fractal_server/app/schemas/v2/accounting.py,sha256=Wylt7uWTiDIFlHJOh4XEtYitk2FjFlmnodDrJDxcr0E,397
|
119
|
-
fractal_server/app/schemas/v2/dataset.py,sha256=
|
120
|
-
fractal_server/app/schemas/v2/dumps.py,sha256=
|
121
|
+
fractal_server/app/schemas/v2/dataset.py,sha256=xNWdOW8hhL5Wx-iwyUPrZfWcC8fFuGDgdOHvZLbGVME,2782
|
122
|
+
fractal_server/app/schemas/v2/dumps.py,sha256=uc9itXekO5IFfR6UucpQ5BX9NZZ8erE4hRR6S6aXlOc,2284
|
121
123
|
fractal_server/app/schemas/v2/history.py,sha256=aCzr68OdNtHzNHrW43F5uxSCCcT6dMaq-_Dq9GpuJ6k,1100
|
122
|
-
fractal_server/app/schemas/v2/job.py,sha256=
|
124
|
+
fractal_server/app/schemas/v2/job.py,sha256=OXPB4oPiMVWYgZu0lGzM_LGACvhWBavsW7c3MmivdDM,4556
|
123
125
|
fractal_server/app/schemas/v2/manifest.py,sha256=8mmB0QwxEgAeGgwKD_fT-o-wFy7lb6HxNXbp17IJqNY,7281
|
124
126
|
fractal_server/app/schemas/v2/project.py,sha256=ulgCmUnX0w-0jrSjVYIT7sxeK95CSNGh2msXydhsgYI,885
|
125
127
|
fractal_server/app/schemas/v2/status_legacy.py,sha256=vc6C3Xri8222bb9OmsghMz05CNuEalO-t2s_nKo341s,954
|
@@ -147,6 +149,7 @@ fractal_server/migrations/versions/091b01f51f88_add_usergroup_and_linkusergroup_
|
|
147
149
|
fractal_server/migrations/versions/19eca0dd47a9_user_settings_project_dir.py,sha256=Q1Gj1cJ0UrdLBJ5AXfFK9QpxTtmcv-4Z3NEGDnxOme4,961
|
148
150
|
fractal_server/migrations/versions/1eac13a26c83_drop_v1_tables.py,sha256=ok8dl4IkI-dfsyE_NZ8IndjQrnQ_g6CDZo4PwozpIwE,1605
|
149
151
|
fractal_server/migrations/versions/316140ff7ee1_remove_usersettings_cache_dir.py,sha256=lANgTox0rz459_yo1Rw7fGCT1qw5sUCUXTLUMc_Bzf8,911
|
152
|
+
fractal_server/migrations/versions/47351f8c7ebc_drop_dataset_filters.py,sha256=vePkVm1iUHiPNKLQ3KR7BBLdHruqBdl87j_tUCbMbEA,1414
|
150
153
|
fractal_server/migrations/versions/4c308bcaea2b_add_task_args_schema_and_task_args_.py,sha256=-wHe-fOffmYeAm0JXVl_lxZ7hhDkaEVqxgxpHkb_uL8,954
|
151
154
|
fractal_server/migrations/versions/4cedeb448a53_workflowtask_foreign_keys_not_nullables.py,sha256=Mob8McGYAcmgvrseyyYOa54E6Gsgr-4SiGdC-r9O4_A,1157
|
152
155
|
fractal_server/migrations/versions/501961cfcd85_remove_link_between_v1_and_v2_tasks_.py,sha256=5ROUgcoZOdjf8kMt6cxuvPhzHmV6xaCxvZEbhUEyZM4,3271
|
@@ -170,6 +173,7 @@ fractal_server/migrations/versions/d4fe3708d309_make_applyworkflow_workflow_dump
|
|
170
173
|
fractal_server/migrations/versions/da2cb2ac4255_user_group_viewer_paths.py,sha256=yGWSA2HIHUybcVy66xBITk08opV2DFYSCIIrulaUZhI,901
|
171
174
|
fractal_server/migrations/versions/db09233ad13a_split_filters_and_keep_old_columns.py,sha256=NumyjvciIjgShLZcmpDvh3ggJxnc-W1kc7vofrpcNOs,2906
|
172
175
|
fractal_server/migrations/versions/e75cac726012_make_applyworkflow_start_timestamp_not_.py,sha256=lOggSvzGWqQvnxxFuSM6W50Ui49R918A-uBuiZJ0pNM,963
|
176
|
+
fractal_server/migrations/versions/e81103413827_add_job_type_filters.py,sha256=t4ImlKNHx5JMgBL2sTpLWunv1gwY8OCFOKd3G338mdE,890
|
173
177
|
fractal_server/migrations/versions/efa89c30e0a4_add_project_timestamp_created.py,sha256=jilQW3QIqYQ4Q6hCnUiG7UtNMpA41ujqrB3tPFiPM1Q,1221
|
174
178
|
fractal_server/migrations/versions/f384e1c0cf5d_drop_task_default_args_columns.py,sha256=9BwqUS9Gf7UW_KjrzHbtViC880qhD452KAytkHWWZyk,746
|
175
179
|
fractal_server/migrations/versions/fbce16ff4e47_new_history_items.py,sha256=TDWCaIoM0Q4SpRWmR9zr_rdp3lJXhCfBPTMhtrP5xYE,3950
|
@@ -205,8 +209,8 @@ fractal_server/tasks/v2/utils_templates.py,sha256=Kc_nSzdlV6KIsO0CQSPs1w70zLyENP
|
|
205
209
|
fractal_server/urls.py,sha256=QjIKAC1a46bCdiPMu3AlpgFbcv6a4l3ABcd5xz190Og,471
|
206
210
|
fractal_server/utils.py,sha256=PMwrxWFxRTQRl1b9h-NRIbFGPKqpH_hXnkAT3NfZdpY,3571
|
207
211
|
fractal_server/zip_tools.py,sha256=GjDgo_sf6V_DDg6wWeBlZu5zypIxycn_l257p_YVKGc,4876
|
208
|
-
fractal_server-2.14.
|
209
|
-
fractal_server-2.14.
|
210
|
-
fractal_server-2.14.
|
211
|
-
fractal_server-2.14.
|
212
|
-
fractal_server-2.14.
|
212
|
+
fractal_server-2.14.0a11.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
|
213
|
+
fractal_server-2.14.0a11.dist-info/METADATA,sha256=_yK06nJ_yK0gkC42b3nVAtSD0_TQTlD7VJwUl9rlzf0,4563
|
214
|
+
fractal_server-2.14.0a11.dist-info/WHEEL,sha256=7dDg4QLnNKTvwIDR9Ac8jJaAmBC_owJrckbC0jjThyA,88
|
215
|
+
fractal_server-2.14.0a11.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
|
216
|
+
fractal_server-2.14.0a11.dist-info/RECORD,,
|
@@ -1,46 +0,0 @@
|
|
1
|
-
from pathlib import Path
|
2
|
-
from typing import Any
|
3
|
-
from typing import Literal
|
4
|
-
|
5
|
-
from ...task_files import TaskFiles
|
6
|
-
from ._local_config import get_local_backend_config
|
7
|
-
from fractal_server.app.models.v2 import WorkflowTaskV2
|
8
|
-
|
9
|
-
|
10
|
-
def _local_submit_setup(
|
11
|
-
*,
|
12
|
-
wftask: WorkflowTaskV2,
|
13
|
-
root_dir_local: Path,
|
14
|
-
root_dir_remote: Path,
|
15
|
-
which_type: Literal["non_parallel", "parallel"],
|
16
|
-
) -> dict[str, Any]:
|
17
|
-
"""
|
18
|
-
Collect WorkflowTask-specific configuration parameters from different
|
19
|
-
sources, and inject them for execution.
|
20
|
-
|
21
|
-
FIXME
|
22
|
-
|
23
|
-
Arguments:
|
24
|
-
wftask: WorkflowTask for which the configuration is to be assembled
|
25
|
-
root_dir_local:
|
26
|
-
root_dir_rempote: Not used in this function.
|
27
|
-
which_type: Whether it is a parallel or non-parallel task.
|
28
|
-
"""
|
29
|
-
|
30
|
-
local_backend_config = get_local_backend_config(
|
31
|
-
wftask=wftask,
|
32
|
-
which_type=which_type,
|
33
|
-
)
|
34
|
-
|
35
|
-
# Get TaskFiles object
|
36
|
-
task_files = TaskFiles(
|
37
|
-
root_dir_local=root_dir_local,
|
38
|
-
root_dir_remote=root_dir_local,
|
39
|
-
task_order=wftask.order,
|
40
|
-
task_name=wftask.task.name,
|
41
|
-
)
|
42
|
-
|
43
|
-
return dict(
|
44
|
-
local_backend_config=local_backend_config,
|
45
|
-
task_files=task_files,
|
46
|
-
)
|
@@ -1,84 +0,0 @@
|
|
1
|
-
# Copyright 2022 (C) Friedrich Miescher Institute for Biomedical Research and
|
2
|
-
# University of Zurich
|
3
|
-
#
|
4
|
-
# Original authors:
|
5
|
-
# Jacopo Nespolo <jacopo.nespolo@exact-lab.it>
|
6
|
-
# Tommaso Comparin <tommaso.comparin@exact-lab.it>
|
7
|
-
#
|
8
|
-
# This file is part of Fractal and was originally developed by eXact lab S.r.l.
|
9
|
-
# <exact-lab.it> under contract with Liberali Lab from the Friedrich Miescher
|
10
|
-
# Institute for Biomedical Research and Pelkmans Lab from the University of
|
11
|
-
# Zurich.
|
12
|
-
"""
|
13
|
-
Submodule to define _slurm_submit_setup, which is also the reference
|
14
|
-
implementation of `submit_setup_call`.
|
15
|
-
"""
|
16
|
-
from pathlib import Path
|
17
|
-
from typing import Any
|
18
|
-
from typing import Literal
|
19
|
-
|
20
|
-
from ...task_files import TaskFiles
|
21
|
-
from fractal_server.app.models.v2 import WorkflowTaskV2
|
22
|
-
from fractal_server.app.runner.executors.slurm_common.get_slurm_config import (
|
23
|
-
get_slurm_config,
|
24
|
-
)
|
25
|
-
|
26
|
-
|
27
|
-
def _slurm_submit_setup(
|
28
|
-
*,
|
29
|
-
wftask: WorkflowTaskV2,
|
30
|
-
root_dir_local: Path,
|
31
|
-
root_dir_remote: Path,
|
32
|
-
which_type: Literal["non_parallel", "parallel"],
|
33
|
-
) -> dict[str, Any]:
|
34
|
-
"""
|
35
|
-
Collect WorkflowTask-specific configuration parameters from different
|
36
|
-
sources, and inject them for execution.
|
37
|
-
|
38
|
-
FIXME
|
39
|
-
|
40
|
-
Here goes all the logic for reading attributes from the appropriate sources
|
41
|
-
and transforming them into an appropriate `SlurmConfig` object (encoding
|
42
|
-
SLURM configuration) and `TaskFiles` object (with details e.g. about file
|
43
|
-
paths or filename prefixes).
|
44
|
-
|
45
|
-
For now, this is the reference implementation for the argument
|
46
|
-
`submit_setup_call` of
|
47
|
-
[fractal_server.app.runner.v2.runner][].
|
48
|
-
|
49
|
-
Arguments:
|
50
|
-
wftask:
|
51
|
-
WorkflowTask for which the configuration is to be assembled
|
52
|
-
workflow_dir_local:
|
53
|
-
Server-owned directory to store all task-execution-related relevant
|
54
|
-
files (inputs, outputs, errors, and all meta files related to the
|
55
|
-
job execution). Note: users cannot write directly to this folder.
|
56
|
-
workflow_dir_remote:
|
57
|
-
User-side directory with the same scope as `workflow_dir_local`,
|
58
|
-
and where a user can write.
|
59
|
-
|
60
|
-
Returns:
|
61
|
-
submit_setup_dict:
|
62
|
-
A dictionary that will be passed on to
|
63
|
-
`FractalSlurmExecutor.submit` and `FractalSlurmExecutor.map`, so
|
64
|
-
as to set extra options.
|
65
|
-
"""
|
66
|
-
|
67
|
-
# Get SlurmConfig object
|
68
|
-
slurm_config = get_slurm_config(
|
69
|
-
wftask=wftask,
|
70
|
-
which_type=which_type,
|
71
|
-
)
|
72
|
-
|
73
|
-
# Get TaskFiles object
|
74
|
-
task_files = TaskFiles(
|
75
|
-
root_dir_local=root_dir_local,
|
76
|
-
root_dir_remote=root_dir_remote,
|
77
|
-
task_order=wftask.order,
|
78
|
-
task_name=wftask.task.name,
|
79
|
-
)
|
80
|
-
|
81
|
-
return dict(
|
82
|
-
slurm_config=slurm_config,
|
83
|
-
task_files=task_files,
|
84
|
-
)
|
@@ -1,48 +0,0 @@
|
|
1
|
-
from typing import Any
|
2
|
-
|
3
|
-
from sqlalchemy.dialects.postgresql import insert as pg_insert
|
4
|
-
from sqlalchemy.orm import Session
|
5
|
-
|
6
|
-
from fractal_server.app.models.v2 import HistoryImageCache
|
7
|
-
|
8
|
-
|
9
|
-
def bulk_upsert_image_cache_fast(
|
10
|
-
*,
|
11
|
-
list_upsert_objects: list[dict[str, Any]],
|
12
|
-
db: Session,
|
13
|
-
) -> None:
|
14
|
-
"""
|
15
|
-
Insert or update many objects into `HistoryImageCache` and commit
|
16
|
-
|
17
|
-
This function is an optimized version of
|
18
|
-
|
19
|
-
```python
|
20
|
-
for obj in list_upsert_objects:
|
21
|
-
db.merge(**obj)
|
22
|
-
db.commit()
|
23
|
-
```
|
24
|
-
|
25
|
-
See docs at
|
26
|
-
https://docs.sqlalchemy.org/en/20/dialects/postgresql.html#insert-on-conflict-upsert
|
27
|
-
|
28
|
-
FIXME: we tried to replace `index_elements` with
|
29
|
-
`constraint="pk_historyimagecache"`, but it did not work as expected.
|
30
|
-
|
31
|
-
Arguments:
|
32
|
-
list_upsert_objects:
|
33
|
-
List of dictionaries for objects to be upsert-ed.
|
34
|
-
db: A sync database session
|
35
|
-
"""
|
36
|
-
if len(list_upsert_objects) == 0:
|
37
|
-
return None
|
38
|
-
stmt = pg_insert(HistoryImageCache).values(list_upsert_objects)
|
39
|
-
stmt = stmt.on_conflict_do_update(
|
40
|
-
index_elements=[
|
41
|
-
HistoryImageCache.zarr_url,
|
42
|
-
HistoryImageCache.dataset_id,
|
43
|
-
HistoryImageCache.workflowtask_id,
|
44
|
-
],
|
45
|
-
set_=dict(latest_history_unit_id=stmt.excluded.latest_history_unit_id),
|
46
|
-
)
|
47
|
-
db.execute(stmt)
|
48
|
-
db.commit()
|
File without changes
|
File without changes
|
File without changes
|