outerbounds 0.3.61__py3-none-any.whl → 0.3.63__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,7 +30,8 @@ the Outerbounds platform.
30
30
  To remove that package, please try `python -m pip uninstall metaflow -y` or reach out to Outerbounds support.
31
31
  After uninstalling the Metaflow package, please reinstall the Outerbounds package using `python -m pip
32
32
  install outerbounds --force`.
33
- As always, please reach out to Outerbounds support for any questions."""
33
+ As always, please reach out to Outerbounds support for any questions.
34
+ """
34
35
 
35
36
  MISSING_EXTENSIONS_MESSAGE = (
36
37
  "The Outerbounds Platform extensions for Metaflow was not found."
@@ -55,11 +56,11 @@ class Narrator:
55
56
 
56
57
  def section_ok(self):
57
58
  if not self.verbose:
58
- click.secho("\U0001F600", err=True)
59
+ click.secho("\U00002705", err=True)
59
60
 
60
61
  def section_not_ok(self):
61
62
  if not self.verbose:
62
- click.secho("\U0001F641", err=True)
63
+ click.secho("\U0000274C", err=True)
63
64
 
64
65
  def announce_check(self, name):
65
66
  if self.verbose:
@@ -233,17 +234,9 @@ class ConfigEntrySpec:
233
234
  self.expected = expected
234
235
 
235
236
 
236
- def get_config_specs():
237
- return [
238
- ConfigEntrySpec(
239
- "METAFLOW_DATASTORE_SYSROOT_S3",
240
- r"s3://[a-z0-9\-]+/metaflow(-[a-z0-9\-]+)?[/]?",
241
- ),
242
- ConfigEntrySpec(
243
- "METAFLOW_DATATOOLS_S3ROOT", r"s3://[a-z0-9\-]+/data(-[a-z0-9\-]+)?[/]?"
244
- ),
237
+ def get_config_specs(default_datastore: str):
238
+ spec = [
245
239
  ConfigEntrySpec("METAFLOW_DEFAULT_AWS_CLIENT_PROVIDER", "obp", expected="obp"),
246
- ConfigEntrySpec("METAFLOW_DEFAULT_DATASTORE", "s3", expected="s3"),
247
240
  ConfigEntrySpec("METAFLOW_DEFAULT_METADATA", "service", expected="service"),
248
241
  ConfigEntrySpec("METAFLOW_KUBERNETES_NAMESPACE", r"jobs-.*"),
249
242
  ConfigEntrySpec("METAFLOW_KUBERNETES_SANDBOX_INIT_SCRIPT", r"eval \$\(.*"),
@@ -253,6 +246,21 @@ def get_config_specs():
253
246
  ConfigEntrySpec("OBP_AUTH_SERVER", r"auth\..*"),
254
247
  ]
255
248
 
249
+ if default_datastore == "s3":
250
+ spec.extend(
251
+ [
252
+ ConfigEntrySpec(
253
+ "METAFLOW_DATASTORE_SYSROOT_S3",
254
+ r"s3://[a-z0-9\-]+/metaflow(-[a-z0-9\-]+)?[/]?",
255
+ ),
256
+ ConfigEntrySpec(
257
+ "METAFLOW_DATATOOLS_S3ROOT",
258
+ r"s3://[a-z0-9\-]+/data(-[a-z0-9\-]+)?[/]?",
259
+ ),
260
+ ]
261
+ )
262
+ return spec
263
+
256
264
 
257
265
  def check_metaflow_config(narrator: Narrator) -> CommandStatus:
258
266
  narrator.announce_section("local Metaflow config")
@@ -269,7 +277,14 @@ def check_metaflow_config(narrator: Narrator) -> CommandStatus:
269
277
  )
270
278
 
271
279
  config = metaflowconfig.init_config(config_dir, profile)
272
- for spec in get_config_specs():
280
+
281
+ if "OBP_METAFLOW_CONFIG_URL" in config:
282
+ # If the config is fetched from a remote source, not much to check
283
+ narrator.announce_check("config entry OBP_METAFLOW_CONFIG_URL")
284
+ narrator.ok()
285
+ return check_status
286
+
287
+ for spec in get_config_specs(config.get("METAFLOW_DEFAULT_DATASTORE", "")):
273
288
  narrator.announce_check("config entry " + spec.name)
274
289
  if spec.name not in config:
275
290
  reason = "Missing"
@@ -621,6 +636,7 @@ class ConfigurationWriter:
621
636
  self.decoded_config = deserialize(self.encoded_config)
622
637
 
623
638
  def process_decoded_config(self):
639
+ assert self.decoded_config is not None
624
640
  config_type = self.decoded_config.get("OB_CONFIG_TYPE", "inline")
625
641
  if config_type == "inline":
626
642
  if "OBP_PERIMETER" in self.decoded_config:
@@ -663,6 +679,7 @@ class ConfigurationWriter:
663
679
  return path.join(self.out_dir, "config_{}.json".format(self.profile))
664
680
 
665
681
  def display(self):
682
+ assert self.decoded_config is not None
666
683
  # Create a copy so we can use the real config later, possibly
667
684
  display_config = dict()
668
685
  for k in self.decoded_config.keys():
@@ -677,6 +694,7 @@ class ConfigurationWriter:
677
694
  return self.confirm_overwrite_config(self.path())
678
695
 
679
696
  def write_config(self):
697
+ assert self.decoded_config is not None
680
698
  config_path = self.path()
681
699
  # TODO config contains auth token - restrict file/dir modes
682
700
  os.makedirs(os.path.dirname(config_path), exist_ok=True)
@@ -861,7 +879,7 @@ def check(no_config, verbose, output, workstation=False):
861
879
  )
862
880
  @click.argument("encoded_config", required=True)
863
881
  def configure(
864
- encoded_config=None, config_dir=None, profile=None, echo=None, force=False
882
+ encoded_config: str, config_dir=None, profile=None, echo=None, force=False
865
883
  ):
866
884
  writer = ConfigurationWriter(encoded_config, config_dir, profile)
867
885
  try:
@@ -3,7 +3,6 @@ import json
3
3
  import os
4
4
  import requests
5
5
  from os import path
6
- import requests
7
6
  from typing import Dict
8
7
  import sys
9
8
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: outerbounds
3
- Version: 0.3.61
3
+ Version: 0.3.63
4
4
  Summary: More Data Science, Less Administration
5
5
  License: Proprietary
6
6
  Keywords: data science,machine learning,MLOps
@@ -23,9 +23,9 @@ Requires-Dist: click (>=8.1.3,<9.0.0)
23
23
  Requires-Dist: google-api-core (>=2.16.1,<3.0.0) ; extra == "gcp"
24
24
  Requires-Dist: google-auth (>=2.27.0,<3.0.0) ; extra == "gcp"
25
25
  Requires-Dist: google-cloud-storage (>=2.14.0,<3.0.0) ; extra == "gcp"
26
- Requires-Dist: ob-metaflow (==2.11.9.1)
27
- Requires-Dist: ob-metaflow-extensions (==1.1.51)
28
- Requires-Dist: ob-metaflow-stubs (==2.11.9.1)
26
+ Requires-Dist: ob-metaflow (==2.11.10.3)
27
+ Requires-Dist: ob-metaflow-extensions (==1.1.54)
28
+ Requires-Dist: ob-metaflow-stubs (==3.1)
29
29
  Requires-Dist: opentelemetry-distro (==0.41b0)
30
30
  Requires-Dist: opentelemetry-exporter-otlp-proto-http (==1.20.0)
31
31
  Requires-Dist: opentelemetry-instrumentation-requests (==0.41b0)
@@ -2,14 +2,14 @@ outerbounds/__init__.py,sha256=GPdaubvAYF8pOFWJ3b-sPMKCpyfpteWVMZWkmaYhxRw,32
2
2
  outerbounds/cli_main.py,sha256=e9UMnPysmc7gbrimq2I4KfltggyU7pw59Cn9aEguVcU,74
3
3
  outerbounds/command_groups/__init__.py,sha256=QPWtj5wDRTINDxVUL7XPqG3HoxHNvYOg08EnuSZB2Hc,21
4
4
  outerbounds/command_groups/cli.py,sha256=H4LxcYTmsY9DQUrReSRLjvbg9s9Ro7s-eUrcMqEJ_9A,261
5
- outerbounds/command_groups/local_setup_cli.py,sha256=UqyYUTKyGRDxzr2v4cl-UXmzTkYNNJ6V0DH_AJea3bc,35968
5
+ outerbounds/command_groups/local_setup_cli.py,sha256=Xqb-tsAkYgc90duC_6COSR9MsDpMNiKigQxlXUUYfN0,36530
6
6
  outerbounds/command_groups/perimeters_cli.py,sha256=OxbxYQnHZDLRb3SFaVpD2mjp8W8s1fvK1Wc4htyRuGw,12757
7
7
  outerbounds/command_groups/workstations_cli.py,sha256=b5lt8_g2B0zCoUoNriTRv32IPB6E4mI2sUhubDT7Yjo,21966
8
8
  outerbounds/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  outerbounds/utils/kubeconfig.py,sha256=l1mUP1j9VIq3fsffi5bJ1Nk-hYlwd1dIqkpj7DvVS1E,7936
10
- outerbounds/utils/metaflowconfig.py,sha256=cQWD7zoVkOPXd6q2tqmqACjL0IN-0RgiQ45ojxXBYSM,3529
10
+ outerbounds/utils/metaflowconfig.py,sha256=JkhT2yOGpN7t2R2p9uaUJRDJU9fqFPwn4DcojjVnJMI,3513
11
11
  outerbounds/utils/schema.py,sha256=cNlgjmteLPbDzSEUSQDsq8txdhMGyezSmM83jU3aa0w,2329
12
- outerbounds-0.3.61.dist-info/METADATA,sha256=0encUZvpDTirlMhoNd1cWIRHm4EZAlC8Kp7Wmc_y9FA,1407
13
- outerbounds-0.3.61.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
14
- outerbounds-0.3.61.dist-info/entry_points.txt,sha256=7ye0281PKlvqxu15rjw60zKg2pMsXI49_A8BmGqIqBw,47
15
- outerbounds-0.3.61.dist-info/RECORD,,
12
+ outerbounds-0.3.63.dist-info/METADATA,sha256=TOtpihvC2KTSD-q6Ns1VkTWrCPTWJ-QI8Vr-4FyPJpg,1403
13
+ outerbounds-0.3.63.dist-info/entry_points.txt,sha256=7ye0281PKlvqxu15rjw60zKg2pMsXI49_A8BmGqIqBw,47
14
+ outerbounds-0.3.63.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
15
+ outerbounds-0.3.63.dist-info/RECORD,,