outerbounds 0.3.180rc0__py3-none-any.whl → 0.3.180rc2__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.
@@ -159,6 +159,20 @@ def _post_create_debug(capsule: CapsuleDeployer, state_dir: str):
159
159
  )
160
160
 
161
161
 
162
+ def _bake_image(app_config: AppConfig, cache_dir: str, logger):
163
+ baking_status = bake_deployment_image(
164
+ app_config=app_config,
165
+ cache_file_path=os.path.join(cache_dir, "image_cache"),
166
+ logger=logger,
167
+ )
168
+ app_config.set_state(
169
+ "image",
170
+ baking_status.resolved_image,
171
+ )
172
+ app_config.set_state("python_path", baking_status.python_path)
173
+ logger("🐳 Using The Docker Image : %s" % app_config.get_state("image"))
174
+
175
+
162
176
  def print_table(data, headers):
163
177
  """Print data in a formatted table."""
164
178
 
@@ -265,6 +279,12 @@ def deployment_instance_options(func):
265
279
  help="The maximum time (in seconds) to wait for the deployment to be ready.",
266
280
  default=600,
267
281
  )
282
+ @click.option(
283
+ "--no-loader",
284
+ is_flag=True,
285
+ help="Do not use the loading spinner for the deployment.",
286
+ default=False,
287
+ )
268
288
  @wraps(func)
269
289
  def wrapper(*args, **kwargs):
270
290
  return func(*args, **kwargs)
@@ -510,6 +530,7 @@ def deploy(
510
530
  readiness_condition=None,
511
531
  max_wait_time=None,
512
532
  readiness_wait_time=None,
533
+ no_loader=False,
513
534
  **options,
514
535
  ):
515
536
  """Deploy an app to the Outerbounds Platform."""
@@ -608,30 +629,31 @@ def deploy(
608
629
  ctx.obj.app_state_dir, app_config.get("name", "default")
609
630
  )
610
631
 
632
+ def _non_spinner_logger(*msg):
633
+ for m in msg:
634
+ logger(m)
635
+
611
636
  deploy_validations(
612
637
  app_config,
613
638
  cache_dir=cache_dir,
614
639
  logger=logger,
615
640
  )
616
- with MultiStepSpinner(
617
- text=lambda: _logger_styled(
618
- "🍞 Baking Docker Image",
619
- timestamp=True,
620
- ),
621
- color=ColorTheme.LOADING_COLOR,
622
- ) as spinner:
623
- _ctx_lgr = partial(_spinner_logger, spinner)
624
- baking_status = bake_deployment_image(
625
- app_config=app_config,
626
- cache_file_path=os.path.join(cache_dir, "image_cache"),
627
- logger=_ctx_lgr,
628
- )
629
- app_config.set_state(
630
- "image",
631
- baking_status.resolved_image,
641
+ image_spinner = None
642
+ img_logger = _non_spinner_logger
643
+ if not no_loader:
644
+ image_spinner = MultiStepSpinner(
645
+ text=lambda: _logger_styled(
646
+ "🍞 Baking Docker Image",
647
+ timestamp=True,
648
+ ),
649
+ color=ColorTheme.LOADING_COLOR,
632
650
  )
633
- app_config.set_state("python_path", baking_status.python_path)
634
- _ctx_lgr("🐳 Using The Docker Image : %s" % app_config.get_state("image"))
651
+ img_logger = partial(_spinner_logger, image_spinner)
652
+ image_spinner.start()
653
+
654
+ _bake_image(app_config, cache_dir, img_logger)
655
+ if image_spinner:
656
+ image_spinner.stop()
635
657
 
636
658
  base_commands = parse_commands(app_config, command)
637
659
 
@@ -700,15 +722,24 @@ def deploy(
700
722
  capsule.create()
701
723
  _post_create_debug(capsule, cache_dir)
702
724
 
703
- with MultiStepSpinner(
704
- text=lambda: _logger_styled(
705
- "💊 Waiting for %s %s to be ready to serve traffic"
706
- % (capsule.capsule_type.lower(), capsule.identifier),
707
- timestamp=True,
708
- ),
709
- color=ColorTheme.LOADING_COLOR,
710
- ) as spinner:
711
- capsule.wait_for_terminal_state(logger=partial(_spinner_logger, spinner))
725
+ capsule_spinner = None
726
+ capsule_logger = _non_spinner_logger
727
+ if not no_loader:
728
+ capsule_spinner = MultiStepSpinner(
729
+ text=lambda: _logger_styled(
730
+ "💊 Waiting for %s %s to be ready to serve traffic"
731
+ % (capsule.capsule_type.lower(), capsule.identifier),
732
+ timestamp=True,
733
+ ),
734
+ color=ColorTheme.LOADING_COLOR,
735
+ )
736
+ capsule_logger = partial(_spinner_logger, capsule_spinner)
737
+ capsule_spinner.start()
738
+
739
+ capsule.wait_for_terminal_state(logger=capsule_logger)
740
+ if capsule_spinner:
741
+ capsule_spinner.stop()
742
+
712
743
  logger(
713
744
  f"💊 {capsule.capsule_type} {app_config.config['name']} ({capsule.identifier}) deployed successfully! You can access it at {capsule.status.out_of_cluster_url}",
714
745
  color=ColorTheme.INFO_COLOR,
@@ -804,8 +835,9 @@ def list(ctx, project, branch, name, tags, format, auth_type):
804
835
  type=KVDictType,
805
836
  help="Filter apps to delete by tag. Format KEY=VALUE. Example --tag foo=bar --tag x=y. If multiple tags are provided, the app must match all of them.",
806
837
  )
838
+ @click.option("--auto-approve", is_flag=True, help="Do not prompt for confirmation")
807
839
  @click.pass_context
808
- def delete(ctx, name, cap_id, project, branch, tags):
840
+ def delete(ctx, name, cap_id, project, branch, tags, auto_approve):
809
841
 
810
842
  """Delete an app/apps from the Outerbounds Platform."""
811
843
  # Atleast one of the args need to be provided
@@ -832,15 +864,16 @@ def delete(ctx, name, cap_id, project, branch, tags):
832
864
  print_table(table_data, headers)
833
865
 
834
866
  # Confirm the deletion
835
- confirm = click.prompt(
836
- click.style(
837
- "💊 Are you sure you want to delete these apps?", fg="red", bold=True
838
- ),
839
- default="no",
840
- type=click.Choice(["yes", "no"]),
841
- )
842
- if confirm == "no":
843
- exit(1)
867
+ if not auto_approve:
868
+ confirm = click.prompt(
869
+ click.style(
870
+ "💊 Are you sure you want to delete these apps?", fg="red", bold=True
871
+ ),
872
+ default="no",
873
+ type=click.Choice(["yes", "no"]),
874
+ )
875
+ if confirm == "no":
876
+ exit(1)
844
877
 
845
878
  def item_show_func(x):
846
879
  if not x:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: outerbounds
3
- Version: 0.3.180rc0
3
+ Version: 0.3.180rc2
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.168rc0)
33
- Requires-Dist: ob-metaflow-stubs (==6.0.3.180rc0)
32
+ Requires-Dist: ob-metaflow-extensions (==1.1.168rc2)
33
+ Requires-Dist: ob-metaflow-stubs (==6.0.3.180rc2)
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"
@@ -44,7 +44,7 @@ outerbounds/_vendor/yaml/serializer.py,sha256=8wFZRy9SsQSktF_f9OOroroqsh4qVUe53r
44
44
  outerbounds/_vendor/yaml/tokens.py,sha256=JBSu38wihGr4l73JwbfMA7Ks1-X84g8-NskTz7KwPmA,2578
45
45
  outerbounds/apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
46
  outerbounds/apps/_state_machine.py,sha256=3hQF5O2zJdtQWdy9e5w393O85u6UjGApqTMlRU3UhFk,12964
47
- outerbounds/apps/app_cli.py,sha256=WP3mCnE6U-56K5bZia91-R4bCodrnGt2yX1yP5Xty3Y,43764
47
+ outerbounds/apps/app_cli.py,sha256=IK6VhCwvOXIm9TWYiPxxIbARw-4vxR78ZK1u27-zVlg,44735
48
48
  outerbounds/apps/app_config.py,sha256=KBmW9grhiuG9XZG-R0GZkM-024cjj6ztGzOX_2wZW34,11291
49
49
  outerbounds/apps/artifacts.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
50
  outerbounds/apps/capsule.py,sha256=2B_d_zuoQzN4Qs3Tiw_v9EwD7ToQLy8_83rWmVjBz48,30693
@@ -76,7 +76,7 @@ outerbounds/utils/metaflowconfig.py,sha256=l2vJbgPkLISU-XPGZFaC8ZKmYFyJemlD6bwB-
76
76
  outerbounds/utils/schema.py,sha256=lMUr9kNgn9wy-sO_t_Tlxmbt63yLeN4b0xQXbDUDj4A,2331
77
77
  outerbounds/utils/utils.py,sha256=4Z8cszNob_8kDYCLNTrP-wWads_S_MdL3Uj3ju4mEsk,501
78
78
  outerbounds/vendor.py,sha256=gRLRJNXtZBeUpPEog0LOeIsl6GosaFFbCxUvR4bW6IQ,5093
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,,
79
+ outerbounds-0.3.180rc2.dist-info/METADATA,sha256=w__jQJnKxKIrW0_wSa_9jpogVOxx08OXKK00XngnYfY,1846
80
+ outerbounds-0.3.180rc2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
81
+ outerbounds-0.3.180rc2.dist-info/entry_points.txt,sha256=AP6rZg7y5SK9e9a9iVq0Fi9Q2KPjPZSwtZ6R98rLw-8,56
82
+ outerbounds-0.3.180rc2.dist-info/RECORD,,