outerbounds 0.3.176rc2__py3-none-any.whl → 0.3.176rc4__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.
- outerbounds/apps/app_cli.py +4 -4
- outerbounds/apps/capsule.py +20 -15
- outerbounds/apps/config_schema.yaml +1 -1
- {outerbounds-0.3.176rc2.dist-info → outerbounds-0.3.176rc4.dist-info}/METADATA +3 -3
- {outerbounds-0.3.176rc2.dist-info → outerbounds-0.3.176rc4.dist-info}/RECORD +7 -7
- {outerbounds-0.3.176rc2.dist-info → outerbounds-0.3.176rc4.dist-info}/WHEEL +0 -0
- {outerbounds-0.3.176rc2.dist-info → outerbounds-0.3.176rc4.dist-info}/entry_points.txt +0 -0
outerbounds/apps/app_cli.py
CHANGED
@@ -525,9 +525,8 @@ def _parse_capsule_table(filtered_capsules):
|
|
525
525
|
|
526
526
|
for capsule in filtered_capsules:
|
527
527
|
spec = capsule.get("spec", {})
|
528
|
-
status = capsule.get("status", {})
|
528
|
+
status = capsule.get("status", {}) or {}
|
529
529
|
cap_id = capsule.get("id")
|
530
|
-
|
531
530
|
display_name = spec.get("displayName", "")
|
532
531
|
ready = str(status.get("readyToServeTraffic", False))
|
533
532
|
auth_type = spec.get("authConfig", {}).get("authType", "")
|
@@ -535,7 +534,8 @@ def _parse_capsule_table(filtered_capsules):
|
|
535
534
|
tags_str = ", ".join(
|
536
535
|
[f"{tag['key']}={tag['value']}" for tag in spec.get("tags", [])]
|
537
536
|
)
|
538
|
-
|
537
|
+
access_info = status.get("accessInfo", {}) or {}
|
538
|
+
url = access_info.get("outOfClusterURL", None)
|
539
539
|
|
540
540
|
table_data.append(
|
541
541
|
[
|
@@ -545,7 +545,7 @@ def _parse_capsule_table(filtered_capsules):
|
|
545
545
|
auth_type,
|
546
546
|
port,
|
547
547
|
tags_str,
|
548
|
-
f"https://{url}",
|
548
|
+
f"https://{url}" if url else "URL not available",
|
549
549
|
]
|
550
550
|
)
|
551
551
|
return headers, table_data
|
outerbounds/apps/capsule.py
CHANGED
@@ -70,14 +70,16 @@ class CapsuleStateMachine:
|
|
70
70
|
|
71
71
|
@property
|
72
72
|
def out_of_cluster_url(self):
|
73
|
-
|
73
|
+
access_info = self.current_status.get("accessInfo", {}) or {}
|
74
|
+
url = access_info.get("outOfClusterURL", None)
|
74
75
|
if url is not None:
|
75
76
|
return f"https://{url}"
|
76
77
|
return None
|
77
78
|
|
78
79
|
@property
|
79
80
|
def in_cluster_url(self):
|
80
|
-
|
81
|
+
access_info = self.current_status.get("accessInfo", {}) or {}
|
82
|
+
url = access_info.get("inClusterURL", None)
|
81
83
|
if url is not None:
|
82
84
|
return f"https://{url}"
|
83
85
|
return None
|
@@ -169,9 +171,11 @@ class CapsuleInput:
|
|
169
171
|
|
170
172
|
_scheduling_config = {}
|
171
173
|
if app_config.get_state("compute_pools", None):
|
172
|
-
_scheduling_config["
|
173
|
-
|
174
|
-
|
174
|
+
_scheduling_config["schedulingConfig"] = {
|
175
|
+
"computePools": [
|
176
|
+
{"name": x} for x in app_config.get_state("compute_pools")
|
177
|
+
]
|
178
|
+
}
|
175
179
|
_description = app_config.get_state("description")
|
176
180
|
_app_type = app_config.get_state("app_type")
|
177
181
|
_final_info = {}
|
@@ -230,7 +234,7 @@ def create_capsule(capsule_input: dict, api_url: str, request_headers: dict):
|
|
230
234
|
retryable_status_codes=[409], # todo : verify me
|
231
235
|
)
|
232
236
|
|
233
|
-
if response.status_code
|
237
|
+
if response.status_code >= 400:
|
234
238
|
raise TODOException(
|
235
239
|
f"Failed to create capsule: {response.status_code} {response.text}"
|
236
240
|
)
|
@@ -245,7 +249,7 @@ def list_capsules(api_url: str, request_headers: dict):
|
|
245
249
|
retryable_status_codes=[409], # todo : verify me
|
246
250
|
conn_error_retries=3,
|
247
251
|
)
|
248
|
-
if response.status_code
|
252
|
+
if response.status_code >= 400:
|
249
253
|
raise TODOException(
|
250
254
|
f"Failed to list capsules: {response.status_code} {response.text}"
|
251
255
|
)
|
@@ -262,7 +266,7 @@ def get_capsule(capsule_id: str, api_url: str, request_headers: dict):
|
|
262
266
|
retryable_status_codes=[409, 404], # todo : verify me
|
263
267
|
conn_error_retries=3,
|
264
268
|
)
|
265
|
-
if response.status_code
|
269
|
+
if response.status_code >= 400:
|
266
270
|
raise TODOException(
|
267
271
|
f"Failed to get capsule: {response.status_code} {response.text}"
|
268
272
|
)
|
@@ -277,7 +281,7 @@ def delete_capsule(capsule_id: str, api_url: str, request_headers: dict):
|
|
277
281
|
headers=request_headers,
|
278
282
|
retryable_status_codes=[409], # todo : verify me
|
279
283
|
)
|
280
|
-
if response.status_code
|
284
|
+
if response.status_code >= 400:
|
281
285
|
raise TODOException(
|
282
286
|
f"Failed to delete capsule: {response.status_code} {response.text}"
|
283
287
|
)
|
@@ -312,10 +316,7 @@ def list_and_filter_capsules(
|
|
312
316
|
return False
|
313
317
|
|
314
318
|
def _all_tags_match(tags, tags_to_match):
|
315
|
-
for t in tags_to_match
|
316
|
-
if _tags_match(tags, t["key"], t["value"]):
|
317
|
-
return True
|
318
|
-
return False
|
319
|
+
return all([_tags_match(tags, t["key"], t["value"]) for t in tags_to_match])
|
319
320
|
|
320
321
|
def _filter_capsules(capsules, project, branch, name, tags, auth_type, capsule_id):
|
321
322
|
_filtered_capsules = []
|
@@ -366,7 +367,7 @@ class Capsule:
|
|
366
367
|
_capsules = list_capsules(base_url, request_headers)
|
367
368
|
if "capsules" not in _capsules:
|
368
369
|
raise TODOException(f"Failed to list capsules")
|
369
|
-
return _capsules.get("capsules", [])
|
370
|
+
return _capsules.get("capsules", []) or []
|
370
371
|
|
371
372
|
@classmethod
|
372
373
|
def delete(cls, identifier: str, base_url: str, perimeter: str):
|
@@ -451,6 +452,7 @@ class Capsule:
|
|
451
452
|
"💊 Waiting for %s %s to be ready to serve traffic"
|
452
453
|
% (self.capsule_type.lower(), self.identifier)
|
453
454
|
)
|
455
|
+
self.status = state_machine
|
454
456
|
for i in range(self._create_timeout):
|
455
457
|
capsule_response = self.get()
|
456
458
|
state_machine.add_status(capsule_response.get("status", {}))
|
@@ -465,9 +467,12 @@ class Capsule:
|
|
465
467
|
state_machine.out_of_cluster_url,
|
466
468
|
),
|
467
469
|
)
|
468
|
-
self.status = state_machine
|
469
470
|
break
|
470
471
|
if self._debug_dir:
|
471
472
|
state_machine.check_for_debug(self._debug_dir)
|
472
473
|
|
474
|
+
if not self.status.ready_to_serve_traffic:
|
475
|
+
raise TODOException(
|
476
|
+
f"Capsule {self.identifier} failed to be ready to serve traffic"
|
477
|
+
)
|
473
478
|
return capsule_response
|
@@ -53,7 +53,7 @@ properties:
|
|
53
53
|
description: Outerbounds integrations to attach to the app. You can use the value you set in the `@secrets` decorator in your code.
|
54
54
|
items:
|
55
55
|
type: string
|
56
|
-
example: ["
|
56
|
+
example: ["hf-token"]
|
57
57
|
environment: # Used in `run` command
|
58
58
|
# Todo: So this part might not be best on the CLI. We should probably have a better way to handle this.
|
59
59
|
# In simplicity, we can just JSON dump anything that looks like a dict/list/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: outerbounds
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.176rc4
|
4
4
|
Summary: More Data Science, Less Administration
|
5
5
|
License: Proprietary
|
6
6
|
Keywords: data science,machine learning,MLOps
|
@@ -29,8 +29,8 @@ Requires-Dist: google-cloud-secret-manager (>=2.20.0,<3.0.0) ; extra == "gcp"
|
|
29
29
|
Requires-Dist: google-cloud-storage (>=2.14.0,<3.0.0) ; extra == "gcp"
|
30
30
|
Requires-Dist: metaflow-checkpoint (==0.2.1)
|
31
31
|
Requires-Dist: ob-metaflow (==2.15.14.1)
|
32
|
-
Requires-Dist: ob-metaflow-extensions (==1.1.
|
33
|
-
Requires-Dist: ob-metaflow-stubs (==6.0.3.
|
32
|
+
Requires-Dist: ob-metaflow-extensions (==1.1.163rc6)
|
33
|
+
Requires-Dist: ob-metaflow-stubs (==6.0.3.176rc4)
|
34
34
|
Requires-Dist: opentelemetry-distro (>=0.41b0) ; extra == "otel"
|
35
35
|
Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.20.0) ; extra == "otel"
|
36
36
|
Requires-Dist: opentelemetry-instrumentation-requests (>=0.41b0) ; extra == "otel"
|
@@ -40,15 +40,15 @@ outerbounds/_vendor/yaml/scanner.py,sha256=ZcI8IngR56PaQ0m27WU2vxCqmDCuRjz-hr7pi
|
|
40
40
|
outerbounds/_vendor/yaml/serializer.py,sha256=8wFZRy9SsQSktF_f9OOroroqsh4qVUe53ry07P9UgCc,4368
|
41
41
|
outerbounds/_vendor/yaml/tokens.py,sha256=JBSu38wihGr4l73JwbfMA7Ks1-X84g8-NskTz7KwPmA,2578
|
42
42
|
outerbounds/apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
43
|
-
outerbounds/apps/app_cli.py,sha256=
|
43
|
+
outerbounds/apps/app_cli.py,sha256=zbzFOYpRkgFVtBhcZGl0sn8BkL6w0uc9PNMx25CECfA,23456
|
44
44
|
outerbounds/apps/app_config.py,sha256=KBmW9grhiuG9XZG-R0GZkM-024cjj6ztGzOX_2wZW34,11291
|
45
45
|
outerbounds/apps/artifacts.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
46
|
-
outerbounds/apps/capsule.py,sha256=
|
46
|
+
outerbounds/apps/capsule.py,sha256=C0xxsGNmsBiwTdybS38jYfLn8VzMp0mQLI6pssha1UY,16965
|
47
47
|
outerbounds/apps/cli_to_config.py,sha256=hV6rfPgCiAX03O363GkvdjSIJBt3-oSbL6F2sTUucFE,3195
|
48
48
|
outerbounds/apps/code_package/__init__.py,sha256=8McF7pgx8ghvjRnazp2Qktlxi9yYwNiwESSQrk-2oW8,68
|
49
49
|
outerbounds/apps/code_package/code_packager.py,sha256=SQDBXKwizzpag5GpwoZpvvkyPOodRSQwk2ecAAfO0HI,23316
|
50
50
|
outerbounds/apps/code_package/examples.py,sha256=aF8qKIJxCVv_ugcShQjqUsXKKKMsm1oMkQIl8w3QKuw,4016
|
51
|
-
outerbounds/apps/config_schema.yaml,sha256=
|
51
|
+
outerbounds/apps/config_schema.yaml,sha256=R1sSKFroqCSkcJScdAKU2vCvhgdFt_PJNZzecHB1oe0,8629
|
52
52
|
outerbounds/apps/dependencies.py,sha256=SqvdFQdFZZW0wXX_CHMHCrfE0TwaRkTvGCRbQ2Mx3q0,3935
|
53
53
|
outerbounds/apps/deployer.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
54
54
|
outerbounds/apps/experimental/__init__.py,sha256=12L_FzZyzv162uo4I6cmlrxat7feUtIu_kxbObTJZTA,3059
|
@@ -72,7 +72,7 @@ outerbounds/utils/metaflowconfig.py,sha256=l2vJbgPkLISU-XPGZFaC8ZKmYFyJemlD6bwB-
|
|
72
72
|
outerbounds/utils/schema.py,sha256=lMUr9kNgn9wy-sO_t_Tlxmbt63yLeN4b0xQXbDUDj4A,2331
|
73
73
|
outerbounds/utils/utils.py,sha256=4Z8cszNob_8kDYCLNTrP-wWads_S_MdL3Uj3ju4mEsk,501
|
74
74
|
outerbounds/vendor.py,sha256=gRLRJNXtZBeUpPEog0LOeIsl6GosaFFbCxUvR4bW6IQ,5093
|
75
|
-
outerbounds-0.3.
|
76
|
-
outerbounds-0.3.
|
77
|
-
outerbounds-0.3.
|
78
|
-
outerbounds-0.3.
|
75
|
+
outerbounds-0.3.176rc4.dist-info/METADATA,sha256=bF2r5YAzE_L92TOuSGmgpNuFvqQb73q-boJXB_cF6Gs,1846
|
76
|
+
outerbounds-0.3.176rc4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
77
|
+
outerbounds-0.3.176rc4.dist-info/entry_points.txt,sha256=7ye0281PKlvqxu15rjw60zKg2pMsXI49_A8BmGqIqBw,47
|
78
|
+
outerbounds-0.3.176rc4.dist-info/RECORD,,
|
File without changes
|
File without changes
|