outerbounds 0.3.179rc5__py3-none-any.whl → 0.3.180rc0__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/_vendor/spinner/__init__.py +4 -0
- outerbounds/_vendor/spinner/spinners.py +478 -0
- outerbounds/_vendor/spinner.LICENSE +21 -0
- outerbounds/apps/_state_machine.py +358 -0
- outerbounds/apps/app_cli.py +587 -36
- outerbounds/apps/capsule.py +324 -68
- outerbounds/apps/cli_to_config.py +9 -1
- outerbounds/apps/config_schema.yaml +5 -0
- outerbounds/apps/utils.py +132 -0
- outerbounds/apps/validations.py +0 -12
- outerbounds/command_groups/cli.py +0 -2
- {outerbounds-0.3.179rc5.dist-info → outerbounds-0.3.180rc0.dist-info}/METADATA +3 -3
- {outerbounds-0.3.179rc5.dist-info → outerbounds-0.3.180rc0.dist-info}/RECORD +15 -12
- outerbounds/command_groups/flowprojects_cli.py +0 -137
- {outerbounds-0.3.179rc5.dist-info → outerbounds-0.3.180rc0.dist-info}/WHEEL +0 -0
- {outerbounds-0.3.179rc5.dist-info → outerbounds-0.3.180rc0.dist-info}/entry_points.txt +0 -0
outerbounds/apps/validations.py
CHANGED
@@ -16,18 +16,6 @@ def deploy_validations(app_config: AppConfig, cache_dir: str, logger):
|
|
16
16
|
raise AppConfigError(f"Secret not found: {secret}")
|
17
17
|
|
18
18
|
# TODO: Next check if the compute pool exists.
|
19
|
-
logger("🍞 Baking Docker Image")
|
20
|
-
baking_status = bake_deployment_image(
|
21
|
-
app_config=app_config,
|
22
|
-
cache_file_path=os.path.join(cache_dir, "image_cache"),
|
23
|
-
logger=logger,
|
24
|
-
)
|
25
|
-
app_config.set_state(
|
26
|
-
"image",
|
27
|
-
baking_status.resolved_image,
|
28
|
-
)
|
29
|
-
app_config.set_state("python_path", baking_status.python_path)
|
30
|
-
logger("🐳 Using The Docker Image : %s" % app_config.get_state("image"))
|
31
19
|
|
32
20
|
|
33
21
|
def run_validations(app_config: AppConfig):
|
@@ -7,7 +7,6 @@ from . import (
|
|
7
7
|
tutorials_cli,
|
8
8
|
fast_bakery_cli,
|
9
9
|
secrets_cli,
|
10
|
-
flowprojects_cli,
|
11
10
|
)
|
12
11
|
|
13
12
|
|
@@ -21,7 +20,6 @@ from . import (
|
|
21
20
|
tutorials_cli.cli,
|
22
21
|
fast_bakery_cli.cli,
|
23
22
|
secrets_cli.cli,
|
24
|
-
flowprojects_cli.cli,
|
25
23
|
],
|
26
24
|
)
|
27
25
|
def cli(**kwargs):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: outerbounds
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.180rc0
|
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.17.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.168rc0)
|
33
|
+
Requires-Dist: ob-metaflow-stubs (==6.0.3.180rc0)
|
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"
|
@@ -20,6 +20,9 @@ outerbounds/_vendor/click/testing.py,sha256=ptpMYgRY7dVfE3UDgkgwayu9ePw98sQI3D7z
|
|
20
20
|
outerbounds/_vendor/click/types.py,sha256=u8LK2CRcVw3jWDutzP_wgFV478TXhsjL8gYSFPjGKkE,35865
|
21
21
|
outerbounds/_vendor/click/utils.py,sha256=33D6E7poH_nrKB-xr-UyDEXnxOcCiQqxuRLtrqeVv6o,18682
|
22
22
|
outerbounds/_vendor/click.LICENSE,sha256=morRBqOU6FO_4h9C9OctWSgZoigF2ZG18ydQKSkrZY0,1475
|
23
|
+
outerbounds/_vendor/spinner/__init__.py,sha256=gTm0NdQGTRxmghye1CYkhRtodji0MezsqAWs9OrLLRc,102
|
24
|
+
outerbounds/_vendor/spinner/spinners.py,sha256=0Hl1dskTzfibHPM5dfHV3no1maFduOCJ48r8mr3tgr0,15786
|
25
|
+
outerbounds/_vendor/spinner.LICENSE,sha256=R2t7cIDZ6-VroHO5M_FWET8adqmdI-PGv0AnhyvCo4A,1069
|
23
26
|
outerbounds/_vendor/vendor_any.txt,sha256=9vi_h2zSBIx0sFM9i69xNEwe-HyeX0_sdtMjImmvgXo,27
|
24
27
|
outerbounds/_vendor/yaml/__init__.py,sha256=lPcXUknB0EUNfCL8MJOgq26y70nOQR_Eajqzycmtnhg,12569
|
25
28
|
outerbounds/_vendor/yaml/_yaml.cpython-311-darwin.so,sha256=YiF55JiadfOvw_mUH-lONNnsiMHj6C6o1SBfTCvvW54,362008
|
@@ -40,28 +43,28 @@ outerbounds/_vendor/yaml/scanner.py,sha256=ZcI8IngR56PaQ0m27WU2vxCqmDCuRjz-hr7pi
|
|
40
43
|
outerbounds/_vendor/yaml/serializer.py,sha256=8wFZRy9SsQSktF_f9OOroroqsh4qVUe53ry07P9UgCc,4368
|
41
44
|
outerbounds/_vendor/yaml/tokens.py,sha256=JBSu38wihGr4l73JwbfMA7Ks1-X84g8-NskTz7KwPmA,2578
|
42
45
|
outerbounds/apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
43
|
-
outerbounds/apps/
|
46
|
+
outerbounds/apps/_state_machine.py,sha256=3hQF5O2zJdtQWdy9e5w393O85u6UjGApqTMlRU3UhFk,12964
|
47
|
+
outerbounds/apps/app_cli.py,sha256=WP3mCnE6U-56K5bZia91-R4bCodrnGt2yX1yP5Xty3Y,43764
|
44
48
|
outerbounds/apps/app_config.py,sha256=KBmW9grhiuG9XZG-R0GZkM-024cjj6ztGzOX_2wZW34,11291
|
45
49
|
outerbounds/apps/artifacts.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
46
|
-
outerbounds/apps/capsule.py,sha256=
|
47
|
-
outerbounds/apps/cli_to_config.py,sha256=
|
50
|
+
outerbounds/apps/capsule.py,sha256=2B_d_zuoQzN4Qs3Tiw_v9EwD7ToQLy8_83rWmVjBz48,30693
|
51
|
+
outerbounds/apps/cli_to_config.py,sha256=9IIrJbiaNXoUruCh1s23KbzN87Qyc_MPfqLqXM3nEaE,3275
|
48
52
|
outerbounds/apps/code_package/__init__.py,sha256=8McF7pgx8ghvjRnazp2Qktlxi9yYwNiwESSQrk-2oW8,68
|
49
53
|
outerbounds/apps/code_package/code_packager.py,sha256=RWvM5BKjgLhu7icsO_n5SSYC57dwyST0dWpoWF88ovU,22881
|
50
54
|
outerbounds/apps/code_package/examples.py,sha256=aF8qKIJxCVv_ugcShQjqUsXKKKMsm1oMkQIl8w3QKuw,4016
|
51
|
-
outerbounds/apps/config_schema.yaml,sha256=
|
55
|
+
outerbounds/apps/config_schema.yaml,sha256=j_mysTAPkIMSocItTg3aduMDfBs2teIhAErvpF0Elus,8826
|
52
56
|
outerbounds/apps/dependencies.py,sha256=SqvdFQdFZZW0wXX_CHMHCrfE0TwaRkTvGCRbQ2Mx3q0,3935
|
53
57
|
outerbounds/apps/deployer.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
54
58
|
outerbounds/apps/experimental/__init__.py,sha256=ExPFIJSF8FcE1pKVyiNQnX8aBi3Rz8YFQ2_s5NVeU7I,3056
|
55
59
|
outerbounds/apps/perimeters.py,sha256=DKWKMbkSx8WObf4yA74UolleT417B9c_6POioztMHxY,1766
|
56
60
|
outerbounds/apps/secrets.py,sha256=27qf04lOBqRjvcswj0ldHOmntP2T6SEjtMJtkJQ_GUg,6100
|
57
|
-
outerbounds/apps/utils.py,sha256=
|
58
|
-
outerbounds/apps/validations.py,sha256=
|
61
|
+
outerbounds/apps/utils.py,sha256=CC5xBKz1N0b8mNYZzJjblT30H_FfHLoS9_gdEArDc4A,12121
|
62
|
+
outerbounds/apps/validations.py,sha256=kR2eXckx0XJ4kUOOLkMRepbTh0INtL1Z8aV4-fZpfc8,678
|
59
63
|
outerbounds/cli_main.py,sha256=e9UMnPysmc7gbrimq2I4KfltggyU7pw59Cn9aEguVcU,74
|
60
64
|
outerbounds/command_groups/__init__.py,sha256=QPWtj5wDRTINDxVUL7XPqG3HoxHNvYOg08EnuSZB2Hc,21
|
61
65
|
outerbounds/command_groups/apps_cli.py,sha256=ecXyLhGxjbct62iqviP9qBX8s4d-XG56ICpTM2h2etk,20821
|
62
|
-
outerbounds/command_groups/cli.py,sha256=
|
66
|
+
outerbounds/command_groups/cli.py,sha256=de4_QY1UeoKX6y-IXIbmklAi6bz0DsdBSmAoCg6lq1o,482
|
63
67
|
outerbounds/command_groups/fast_bakery_cli.py,sha256=5kja7v6C651XAY6dsP_IkBPJQgfU4hA4S9yTOiVPhW0,6213
|
64
|
-
outerbounds/command_groups/flowprojects_cli.py,sha256=gFAA_zUIyhD092Hd7IW5InuIxOqdwRJsHgyWQjy8LZw,3792
|
65
68
|
outerbounds/command_groups/local_setup_cli.py,sha256=tuuqJRXQ_guEwOuQSIf9wkUU0yg8yAs31myGViAK15s,36364
|
66
69
|
outerbounds/command_groups/perimeters_cli.py,sha256=iF_Uw7ROiSctf6FgoJEy30iDBLVE1j9FKuR3shgJRmc,19050
|
67
70
|
outerbounds/command_groups/secrets_cli.py,sha256=Vgn_aiTo76a0s5hCJhNWEOrCVhyYeivD08ooQxz0y7c,2952
|
@@ -73,7 +76,7 @@ outerbounds/utils/metaflowconfig.py,sha256=l2vJbgPkLISU-XPGZFaC8ZKmYFyJemlD6bwB-
|
|
73
76
|
outerbounds/utils/schema.py,sha256=lMUr9kNgn9wy-sO_t_Tlxmbt63yLeN4b0xQXbDUDj4A,2331
|
74
77
|
outerbounds/utils/utils.py,sha256=4Z8cszNob_8kDYCLNTrP-wWads_S_MdL3Uj3ju4mEsk,501
|
75
78
|
outerbounds/vendor.py,sha256=gRLRJNXtZBeUpPEog0LOeIsl6GosaFFbCxUvR4bW6IQ,5093
|
76
|
-
outerbounds-0.3.
|
77
|
-
outerbounds-0.3.
|
78
|
-
outerbounds-0.3.
|
79
|
-
outerbounds-0.3.
|
79
|
+
outerbounds-0.3.180rc0.dist-info/METADATA,sha256=ZrT_Hh1X6HMwOb7HPBh4Se2gm8NG0uqkW6oDf3dGA-w,1846
|
80
|
+
outerbounds-0.3.180rc0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
81
|
+
outerbounds-0.3.180rc0.dist-info/entry_points.txt,sha256=AP6rZg7y5SK9e9a9iVq0Fi9Q2KPjPZSwtZ6R98rLw-8,56
|
82
|
+
outerbounds-0.3.180rc0.dist-info/RECORD,,
|
@@ -1,137 +0,0 @@
|
|
1
|
-
import json
|
2
|
-
import os
|
3
|
-
import sys
|
4
|
-
import requests
|
5
|
-
|
6
|
-
from ..utils import metaflowconfig
|
7
|
-
from outerbounds._vendor import click
|
8
|
-
|
9
|
-
|
10
|
-
@click.group()
|
11
|
-
def cli(**kwargs):
|
12
|
-
pass
|
13
|
-
|
14
|
-
|
15
|
-
@cli.group(help="Commands for pushing Deployments metadata.", hidden=True)
|
16
|
-
def flowproject(**kwargs):
|
17
|
-
pass
|
18
|
-
|
19
|
-
|
20
|
-
@flowproject.command()
|
21
|
-
@click.option(
|
22
|
-
"-d",
|
23
|
-
"--config-dir",
|
24
|
-
default=os.path.expanduser(os.environ.get("METAFLOW_HOME", "~/.metaflowconfig")),
|
25
|
-
help="Path to Metaflow configuration directory",
|
26
|
-
show_default=True,
|
27
|
-
)
|
28
|
-
@click.option(
|
29
|
-
"-p",
|
30
|
-
"--profile",
|
31
|
-
default=os.environ.get("METAFLOW_PROFILE", ""),
|
32
|
-
help="The named metaflow profile in which your workstation exists",
|
33
|
-
)
|
34
|
-
@click.option("--id", help="The ID for this deployment")
|
35
|
-
def get_metadata(config_dir, profile, id):
|
36
|
-
api_url = metaflowconfig.get_sanitized_url_from_config(
|
37
|
-
config_dir, profile, "OBP_API_SERVER"
|
38
|
-
)
|
39
|
-
perimeter = _get_perimeter()
|
40
|
-
headers = _get_request_headers()
|
41
|
-
|
42
|
-
project, branch = _parse_id(id)
|
43
|
-
|
44
|
-
# GET the latest flowproject config in order to modify it
|
45
|
-
# /v1/perimeters/:perimeter/:project/:branch/flowprojects/latest
|
46
|
-
response = requests.get(
|
47
|
-
url=f"{api_url}/v1/perimeters/{perimeter}/projects/{project}/branches/{branch}/latestflowproject",
|
48
|
-
headers=headers,
|
49
|
-
)
|
50
|
-
if response.status_code >= 500:
|
51
|
-
raise Exception("API request failed.")
|
52
|
-
|
53
|
-
body = response.json()
|
54
|
-
if response.status_code >= 400:
|
55
|
-
raise Exception("request failed: %s" % body)
|
56
|
-
|
57
|
-
out = json.dumps(body)
|
58
|
-
|
59
|
-
print(out, file=sys.stdout)
|
60
|
-
|
61
|
-
|
62
|
-
@flowproject.command()
|
63
|
-
@click.option(
|
64
|
-
"-d",
|
65
|
-
"--config-dir",
|
66
|
-
default=os.path.expanduser(os.environ.get("METAFLOW_HOME", "~/.metaflowconfig")),
|
67
|
-
help="Path to Metaflow configuration directory",
|
68
|
-
show_default=True,
|
69
|
-
)
|
70
|
-
@click.option(
|
71
|
-
"-p",
|
72
|
-
"--profile",
|
73
|
-
default=os.environ.get("METAFLOW_PROFILE", ""),
|
74
|
-
help="The named metaflow profile in which your workstation exists",
|
75
|
-
)
|
76
|
-
@click.argument("json_str")
|
77
|
-
def set_metadata(config_dir, profile, json_str):
|
78
|
-
api_url = metaflowconfig.get_sanitized_url_from_config(
|
79
|
-
config_dir, profile, "OBP_API_SERVER"
|
80
|
-
)
|
81
|
-
|
82
|
-
perimeter = _get_perimeter()
|
83
|
-
headers = _get_request_headers()
|
84
|
-
payload = json.loads(json_str)
|
85
|
-
|
86
|
-
# POST the updated flowproject config
|
87
|
-
# /v1/perimeters/:perimeter/flowprojects
|
88
|
-
response = requests.post(
|
89
|
-
url=f"{api_url}/v1/perimeters/{perimeter}/flowprojects",
|
90
|
-
json=payload,
|
91
|
-
headers=headers,
|
92
|
-
)
|
93
|
-
if response.status_code >= 500:
|
94
|
-
raise Exception("API request failed. %s" % response.text)
|
95
|
-
|
96
|
-
if response.status_code >= 400:
|
97
|
-
raise Exception("request failed: %s" % response.text)
|
98
|
-
body = response.json()
|
99
|
-
|
100
|
-
print(body, file=sys.stdout)
|
101
|
-
|
102
|
-
|
103
|
-
def _get_request_headers():
|
104
|
-
headers = {"Content-Type": "application/json", "Connection": "keep-alive"}
|
105
|
-
try:
|
106
|
-
from metaflow.metaflow_config import SERVICE_HEADERS
|
107
|
-
|
108
|
-
headers = {**headers, **(SERVICE_HEADERS or {})}
|
109
|
-
except ImportError:
|
110
|
-
headers = headers
|
111
|
-
|
112
|
-
return headers
|
113
|
-
|
114
|
-
|
115
|
-
def _get_perimeter():
|
116
|
-
# Get current perimeter
|
117
|
-
from metaflow_extensions.outerbounds.remote_config import init_config # type: ignore
|
118
|
-
|
119
|
-
conf = init_config()
|
120
|
-
if "OBP_PERIMETER" in conf:
|
121
|
-
perimeter = conf["OBP_PERIMETER"]
|
122
|
-
else:
|
123
|
-
# if the perimeter is not in metaflow config, try to get it from the environment
|
124
|
-
perimeter = os.environ.get("OBP_PERIMETER", None)
|
125
|
-
if perimeter is None:
|
126
|
-
raise Exception("Perimeter not found in config, but is required.")
|
127
|
-
|
128
|
-
return perimeter
|
129
|
-
|
130
|
-
|
131
|
-
def _parse_id(id: str):
|
132
|
-
parts = id.split("/")
|
133
|
-
if len(parts) != 2:
|
134
|
-
raise Exception("ID should consist of two parts: project/branch")
|
135
|
-
|
136
|
-
project, branch = parts
|
137
|
-
return project, branch
|
File without changes
|
File without changes
|