runnable 0.28.0__py3-none-any.whl → 0.28.2__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- extensions/job_executor/__init__.py +1 -7
- extensions/job_executor/k8s.py +15 -2
- {runnable-0.28.0.dist-info → runnable-0.28.2.dist-info}/METADATA +1 -1
- {runnable-0.28.0.dist-info → runnable-0.28.2.dist-info}/RECORD +7 -7
- {runnable-0.28.0.dist-info → runnable-0.28.2.dist-info}/WHEEL +0 -0
- {runnable-0.28.0.dist-info → runnable-0.28.2.dist-info}/entry_points.txt +0 -0
- {runnable-0.28.0.dist-info → runnable-0.28.2.dist-info}/licenses/LICENSE +0 -0
@@ -144,14 +144,10 @@ class GenericJobExecutor(BaseJobExecutor):
|
|
144
144
|
logger.info("No catalog settings found")
|
145
145
|
return None
|
146
146
|
|
147
|
-
compute_data_folder = self._context.catalog_handler.compute_data_folder
|
148
|
-
|
149
147
|
data_catalogs = []
|
150
148
|
for name_pattern in catalog_settings:
|
151
149
|
data_catalog = self._context.catalog_handler.put(
|
152
150
|
name=name_pattern,
|
153
|
-
run_id=self._context.run_id,
|
154
|
-
compute_data_folder=compute_data_folder,
|
155
151
|
)
|
156
152
|
|
157
153
|
logger.debug(f"Added data catalog: {data_catalog} to job log")
|
@@ -168,7 +164,5 @@ class GenericJobExecutor(BaseJobExecutor):
|
|
168
164
|
)
|
169
165
|
task_console.save_text(log_file_name)
|
170
166
|
# Put the log file in the catalog
|
171
|
-
self._context.catalog_handler.put(
|
172
|
-
name=log_file_name, run_id=self._context.run_id
|
173
|
-
)
|
167
|
+
self._context.catalog_handler.put(name=log_file_name)
|
174
168
|
os.remove(log_file_name)
|
extensions/job_executor/k8s.py
CHANGED
@@ -34,6 +34,19 @@ class ImagePullPolicy(str, Enum):
|
|
34
34
|
NEVER = "Never"
|
35
35
|
|
36
36
|
|
37
|
+
class TolerationOperator(str, Enum):
|
38
|
+
EXISTS = "Exists"
|
39
|
+
EQUAL = "Equal"
|
40
|
+
|
41
|
+
|
42
|
+
class Toleration(BaseModel):
|
43
|
+
key: str
|
44
|
+
operator: TolerationOperator = TolerationOperator.EQUAL
|
45
|
+
value: Optional[str]
|
46
|
+
effect: str
|
47
|
+
toleration_seconds: Optional[int] = Field(default=None)
|
48
|
+
|
49
|
+
|
37
50
|
class LabelSelectorRequirement(BaseModel):
|
38
51
|
key: str
|
39
52
|
operator: Operator
|
@@ -124,7 +137,7 @@ class PVCVolume(BaseModel):
|
|
124
137
|
class K8sTemplateSpec(BaseModel):
|
125
138
|
active_deadline_seconds: int = Field(default=60 * 60 * 2) # 2 hours
|
126
139
|
node_selector: Optional[dict[str, str]] = None
|
127
|
-
tolerations: Optional[list[
|
140
|
+
tolerations: Optional[list[Toleration]] = None
|
128
141
|
volumes: Optional[list[HostPathVolume | PVCVolume]] = Field(
|
129
142
|
default_factory=lambda: []
|
130
143
|
)
|
@@ -260,7 +273,7 @@ class GenericK8sJobExecutor(GenericJobExecutor):
|
|
260
273
|
tolerations = None
|
261
274
|
if self.job_spec.template.spec.tolerations:
|
262
275
|
tolerations = [
|
263
|
-
self._client.V1Toleration(**toleration)
|
276
|
+
self._client.V1Toleration(**toleration.model_dump(by_alias=True))
|
264
277
|
for toleration in self.job_spec.template.spec.tolerations
|
265
278
|
]
|
266
279
|
|
@@ -7,8 +7,8 @@ extensions/catalog/minio.py,sha256=R3GvfCxN1GTcs4bQIAWh79_GHDTVd14gnpKlzwFeKUI,2
|
|
7
7
|
extensions/catalog/pyproject.toml,sha256=lLNxY6v04c8I5QK_zKw_E6sJTArSJRA_V-79ktaA3Hk,279
|
8
8
|
extensions/catalog/s3.py,sha256=Sw5t8_kVRprn3uGGJCiHn7M9zw1CLaCOFj6YErtfG0o,287
|
9
9
|
extensions/job_executor/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
-
extensions/job_executor/__init__.py,sha256=
|
11
|
-
extensions/job_executor/k8s.py,sha256=
|
10
|
+
extensions/job_executor/__init__.py,sha256=E2R6GV5cZTlZdqA5SVJ6ajZFh4oruM0k8AKHkpOZ3W8,5772
|
11
|
+
extensions/job_executor/k8s.py,sha256=nIEiIUOYYwAYKcl0DboWnsL55lM-GUUXoirikb3BVps,15650
|
12
12
|
extensions/job_executor/k8s_job_spec.yaml,sha256=7aFpxHdO_p6Hkc3YxusUOuAQTD1Myu0yTPX9DrhxbOg,1158
|
13
13
|
extensions/job_executor/local.py,sha256=FvxTk0vyxdrbLOAyNkLyjvmmowypabWOSITQBK_ffVE,1907
|
14
14
|
extensions/job_executor/local_container.py,sha256=hyFnpicCp3_87mZsW64P6KSVbz7XMLjwJUWVjeCJ0_I,6627
|
@@ -56,8 +56,8 @@ runnable/sdk.py,sha256=T1nqDpLN9fULvvU9L-oY0EHqYdKUI9qk7oekLynm02Y,33568
|
|
56
56
|
runnable/secrets.py,sha256=PXcEJw-4WPzeWRLfsatcPPyr1zkqgHzdRWRcS9vvpvM,2354
|
57
57
|
runnable/tasks.py,sha256=X6xijut7ffwpfYDcXoN6y0AcRVd7fWHs676DJ00Kma4,29134
|
58
58
|
runnable/utils.py,sha256=hBr7oGwGL2VgfITlQCTz-a1iwvvf7Mfl-HY8UdENZac,19929
|
59
|
-
runnable-0.28.
|
60
|
-
runnable-0.28.
|
61
|
-
runnable-0.28.
|
62
|
-
runnable-0.28.
|
63
|
-
runnable-0.28.
|
59
|
+
runnable-0.28.2.dist-info/METADATA,sha256=_cIg_HPnrDO-LUIUuH2riE8g2oPGzbvEUrRkdWYsTEI,10047
|
60
|
+
runnable-0.28.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
61
|
+
runnable-0.28.2.dist-info/entry_points.txt,sha256=ioMbWojILtdibYVgh1jXJ00SpK-tX3gy7oVGDq61cSk,1839
|
62
|
+
runnable-0.28.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
63
|
+
runnable-0.28.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|