outerbounds 0.3.179rc3__py3-none-any.whl → 0.3.179rc4__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 +9 -20
- outerbounds/apps/perimeters.py +49 -0
- {outerbounds-0.3.179rc3.dist-info → outerbounds-0.3.179rc4.dist-info}/METADATA +3 -3
- {outerbounds-0.3.179rc3.dist-info → outerbounds-0.3.179rc4.dist-info}/RECORD +6 -5
- {outerbounds-0.3.179rc3.dist-info → outerbounds-0.3.179rc4.dist-info}/WHEEL +0 -0
- {outerbounds-0.3.179rc3.dist-info → outerbounds-0.3.179rc4.dist-info}/entry_points.txt +0 -0
outerbounds/apps/app_cli.py
CHANGED
@@ -25,6 +25,7 @@ from .app_config import (
|
|
25
25
|
CAPSULE_DEBUG,
|
26
26
|
AuthType,
|
27
27
|
)
|
28
|
+
from .perimeters import PerimeterExtractor
|
28
29
|
from .cli_to_config import build_config_from_options
|
29
30
|
from .utils import CommaSeparatedListType, KVPairType, KVDictType
|
30
31
|
from . import experimental
|
@@ -137,28 +138,16 @@ def app(ctx):
|
|
137
138
|
config_dir = os.path.expanduser(
|
138
139
|
os.environ.get("METAFLOW_HOME", "~/.metaflowconfig")
|
139
140
|
)
|
140
|
-
|
141
|
-
config_dir, profile
|
141
|
+
perimeter, api_server = PerimeterExtractor.for_ob_cli(
|
142
|
+
config_dir=config_dir, profile=profile
|
142
143
|
)
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
)
|
148
|
-
else:
|
149
|
-
ob_config_file_path = metaflowconfig.get_ob_config_file_path(
|
150
|
-
config_dir, profile
|
144
|
+
if perimeter is None or api_server is None:
|
145
|
+
raise AppConfigError(
|
146
|
+
"Perimeter not found in the environment, Found perimeter: %s, api_server: %s"
|
147
|
+
% (perimeter, api_server)
|
151
148
|
)
|
152
|
-
|
153
|
-
|
154
|
-
ob_config = json.load(f)
|
155
|
-
ctx.obj.perimeter = ob_config.get("OB_CURRENT_PERIMETER")
|
156
|
-
else:
|
157
|
-
raise AppConfigError(
|
158
|
-
"OB_CURRENT_PERIMETER or OBP_PERIMETER is not set and no ob_config.json file found in %s for Profile %s. It was checking it in the following location: %s"
|
159
|
-
% (config_dir, profile, ob_config_file_path)
|
160
|
-
)
|
161
|
-
|
149
|
+
ctx.obj.perimeter = perimeter
|
150
|
+
ctx.obj.api_url = api_server
|
162
151
|
os.makedirs(ctx.obj.app_state_dir, exist_ok=True)
|
163
152
|
|
164
153
|
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import os
|
2
|
+
import json
|
3
|
+
from typing import Tuple
|
4
|
+
|
5
|
+
|
6
|
+
class PerimeterExtractor:
|
7
|
+
@classmethod
|
8
|
+
def for_ob_cli(cls, config_dir: str, profile: str) -> Tuple[str, str]:
|
9
|
+
"""
|
10
|
+
This function will be called when we are trying to extract the perimeter
|
11
|
+
via the ob cli's execution. We will rely on the following logic:
|
12
|
+
1. check environment variables like OB_CURRENT_PERIMETER / OBP_PERIMETER
|
13
|
+
2. run init config to extract the perimeter related configurations.
|
14
|
+
|
15
|
+
Returns
|
16
|
+
-------
|
17
|
+
Tuple[str, str] : Tuple containing perimeter name , API server url.
|
18
|
+
"""
|
19
|
+
from outerbounds.utils import metaflowconfig
|
20
|
+
|
21
|
+
perimeter = None
|
22
|
+
api_server = None
|
23
|
+
if os.environ.get("OB_CURRENT_PERIMETER") or os.environ.get("OBP_PERIMETER"):
|
24
|
+
perimeter = os.environ.get("OB_CURRENT_PERIMETER") or os.environ.get(
|
25
|
+
"OBP_PERIMETER"
|
26
|
+
)
|
27
|
+
|
28
|
+
if os.environ.get("OBP_API_SERVER"):
|
29
|
+
api_server = os.environ.get("OBP_API_SERVER")
|
30
|
+
|
31
|
+
if perimeter is None:
|
32
|
+
metaflow_config = metaflowconfig.init_config(config_dir, profile)
|
33
|
+
perimeter = metaflow_config.get("OBP_PERIMETER")
|
34
|
+
api_server = metaflow_config.get("OBP_API_SERVER")
|
35
|
+
|
36
|
+
return perimeter, api_server
|
37
|
+
|
38
|
+
pass
|
39
|
+
|
40
|
+
@classmethod
|
41
|
+
def during_metaflow_execution(cls):
|
42
|
+
pass # todo: implement this
|
43
|
+
|
44
|
+
|
45
|
+
def general_purpose_perimeter_extractor(config_dir: str, profile: str) -> str:
|
46
|
+
"""
|
47
|
+
This function will rely on a mix of configuration variables and utilities with ob package to extract the perimeter
|
48
|
+
from the current environment.
|
49
|
+
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: outerbounds
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.179rc4
|
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.166rc5)
|
33
|
+
Requires-Dist: ob-metaflow-stubs (==6.0.3.179rc4)
|
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,7 +40,7 @@ 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=r-cwgZ04qL6yAa1mYMKLR4y7zKc7lzLR7tA6oCT78rs,24534
|
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
46
|
outerbounds/apps/capsule.py,sha256=5lx2M8z8hYNf4_5sX1jk61alrqpEDM8aC0ZVUXu69wI,18883
|
@@ -52,6 +52,7 @@ outerbounds/apps/config_schema.yaml,sha256=27uanKvGQkhOj8jsGRKkenxuYpMLAFnlx486r
|
|
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=ExPFIJSF8FcE1pKVyiNQnX8aBi3Rz8YFQ2_s5NVeU7I,3056
|
55
|
+
outerbounds/apps/perimeters.py,sha256=5aX9CK4051KcZkS6XzkeQLAYnE4HPwZ48au4P60_T4A,1668
|
55
56
|
outerbounds/apps/secrets.py,sha256=27qf04lOBqRjvcswj0ldHOmntP2T6SEjtMJtkJQ_GUg,6100
|
56
57
|
outerbounds/apps/utils.py,sha256=549dmQ-r61ihDf5nIAKQv7kDJuxBaO4Xd6BR2xMsI_w,8086
|
57
58
|
outerbounds/apps/validations.py,sha256=AVEw9eCvkzqq1m5ZC8btaWrSR6kWYKzarELfrASuAwQ,1117
|
@@ -72,7 +73,7 @@ outerbounds/utils/metaflowconfig.py,sha256=l2vJbgPkLISU-XPGZFaC8ZKmYFyJemlD6bwB-
|
|
72
73
|
outerbounds/utils/schema.py,sha256=lMUr9kNgn9wy-sO_t_Tlxmbt63yLeN4b0xQXbDUDj4A,2331
|
73
74
|
outerbounds/utils/utils.py,sha256=4Z8cszNob_8kDYCLNTrP-wWads_S_MdL3Uj3ju4mEsk,501
|
74
75
|
outerbounds/vendor.py,sha256=gRLRJNXtZBeUpPEog0LOeIsl6GosaFFbCxUvR4bW6IQ,5093
|
75
|
-
outerbounds-0.3.
|
76
|
-
outerbounds-0.3.
|
77
|
-
outerbounds-0.3.
|
78
|
-
outerbounds-0.3.
|
76
|
+
outerbounds-0.3.179rc4.dist-info/METADATA,sha256=PULOgUdcjAk8I8hTDx5nrdB-gfPuj3UcRk3CqJxLNhA,1846
|
77
|
+
outerbounds-0.3.179rc4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
78
|
+
outerbounds-0.3.179rc4.dist-info/entry_points.txt,sha256=AP6rZg7y5SK9e9a9iVq0Fi9Q2KPjPZSwtZ6R98rLw-8,56
|
79
|
+
outerbounds-0.3.179rc4.dist-info/RECORD,,
|
File without changes
|
File without changes
|