ob-metaflow-extensions 1.1.136__py2.py3-none-any.whl → 1.1.138__py2.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.

Potentially problematic release.


This version of ob-metaflow-extensions might be problematic. Click here for more details.

@@ -267,7 +267,7 @@ class DockerEnvironment(MetaflowEnvironment):
267
267
  packages = get_pinned_conda_libs(python, self.datastore_type)
268
268
  packages.update(dependencies.attributes["packages"] if dependencies else {})
269
269
 
270
- return {
270
+ requested = {
271
271
  "python": python,
272
272
  "pypi_packages": (
273
273
  packages if isinstance(dependencies, PyPIStepDecorator) else None
@@ -277,15 +277,35 @@ class DockerEnvironment(MetaflowEnvironment):
277
277
  ),
278
278
  "base_image": base_image,
279
279
  }
280
+ dedup_key = hashlib.sha256(
281
+ json.dumps(requested).encode("utf-8")
282
+ ).hexdigest()
283
+
284
+ return step.name, dedup_key, requested
280
285
 
281
286
  with ThreadPoolExecutor() as executor:
282
287
  prepared_args = list(executor.map(prepare_step, steps))
283
- for i, args in enumerate(prepared_args, 1):
284
- args["ref"] = f"#{i:02d}"
285
- futures = [executor.submit(_cached_bake, **args) for args in prepared_args]
288
+ # Deduplicate the requests for baking images of steps.
289
+ # We do not want to bake the same image twice.
290
+ dedup_requests = {}
291
+ for step_name, key, args in prepared_args:
292
+ if key not in dedup_requests:
293
+ dedup_requests[key] = {"step_names": set(), "args": args}
294
+ dedup_requests[key]["step_names"].add(step_name)
295
+
296
+ # unique futures
297
+ futures = []
298
+ for i, kv in enumerate(dedup_requests.items(), 1):
299
+ key, value = kv
300
+ future = executor.submit(
301
+ _cached_bake, **{**value["args"], "ref": f"#{i:02d}"}
302
+ )
303
+ futures.append({"step_names": value["step_names"], "future": future})
304
+
286
305
  results = {}
287
- for step, future in zip(steps, futures):
288
- results[step.name] = future.result()
306
+ for item in futures:
307
+ for step_name in item["step_names"]:
308
+ results[step_name] = item["future"].result()
289
309
 
290
310
  return results
291
311
 
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ob-metaflow-extensions
3
- Version: 1.1.136
3
+ Version: 1.1.138
4
4
  Summary: Outerbounds Platform Extensions for Metaflow
5
5
  Author: Outerbounds, Inc.
6
6
  License: Commercial
7
7
  Description-Content-Type: text/markdown
8
8
  Requires-Dist: boto3
9
9
  Requires-Dist: kubernetes
10
- Requires-Dist: ob-metaflow (==2.15.3.1)
10
+ Requires-Dist: ob-metaflow (==2.15.6.1)
11
11
 
12
12
  # Outerbounds platform package
13
13
 
@@ -9,7 +9,7 @@ metaflow_extensions/outerbounds/plugins/card_utilities/async_cards.py,sha256=6rQ
9
9
  metaflow_extensions/outerbounds/plugins/card_utilities/extra_components.py,sha256=D8rgCaSc7PuLD0MHJjqsjN0g0PQMN1H-ySOJqi5uIOE,19111
10
10
  metaflow_extensions/outerbounds/plugins/card_utilities/injector.py,sha256=UQtHrviFs7Z5LBh0nbaIv8aEnHnyXFjs9TiGCjtcIWc,2452
11
11
  metaflow_extensions/outerbounds/plugins/fast_bakery/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- metaflow_extensions/outerbounds/plugins/fast_bakery/docker_environment.py,sha256=i6F3FXwvEhkmUCTHDJ4VmSoL6vKyQhC_YRCtY6F4EkA,14209
12
+ metaflow_extensions/outerbounds/plugins/fast_bakery/docker_environment.py,sha256=Tl520HdBteg-aDOM7mnnJJpdDCZc49BmFFmLUc_vTi8,15018
13
13
  metaflow_extensions/outerbounds/plugins/fast_bakery/fast_bakery.py,sha256=cj63FrdioggipQFP8GwgxU3FYe6IyzjGSUGYxLQZ4nQ,5189
14
14
  metaflow_extensions/outerbounds/plugins/fast_bakery/fast_bakery_cli.py,sha256=kqFyu2bJSnc9_9aYfBpz5xK6L6luWFZK_NMuh8f1eVk,1494
15
15
  metaflow_extensions/outerbounds/plugins/fast_bakery/fast_bakery_decorator.py,sha256=MXSIp05-jvt8Q2uGaLKjtuM_ToLeRLxhtMbfHc9Kcko,1515
@@ -53,7 +53,7 @@ metaflow_extensions/outerbounds/toplevel/plugins/gcp/__init__.py,sha256=BbZiaH3u
53
53
  metaflow_extensions/outerbounds/toplevel/plugins/kubernetes/__init__.py,sha256=5zG8gShSj8m7rgF4xgWBZFuY3GDP5n1T0ktjRpGJLHA,69
54
54
  metaflow_extensions/outerbounds/toplevel/plugins/ollama/__init__.py,sha256=GRSz2zwqkvlmFS6bcfYD_CX6CMko9DHQokMaH1iBshA,47
55
55
  metaflow_extensions/outerbounds/toplevel/plugins/snowflake/__init__.py,sha256=LptpH-ziXHrednMYUjIaosS1SXD3sOtF_9_eRqd8SJw,50
56
- ob_metaflow_extensions-1.1.136.dist-info/METADATA,sha256=4VKMvHaHd76Iw0NhwQOr8tmfIZRupUssZaVM_ZxcZ_M,520
57
- ob_metaflow_extensions-1.1.136.dist-info/WHEEL,sha256=bb2Ot9scclHKMOLDEHY6B2sicWOgugjFKaJsT7vwMQo,110
58
- ob_metaflow_extensions-1.1.136.dist-info/top_level.txt,sha256=NwG0ukwjygtanDETyp_BUdtYtqIA_lOjzFFh1TsnxvI,20
59
- ob_metaflow_extensions-1.1.136.dist-info/RECORD,,
56
+ ob_metaflow_extensions-1.1.138.dist-info/METADATA,sha256=3r5V79L8IdAPZmfzevOm2d-g9nGvsQjrCB_PvfG6IhY,520
57
+ ob_metaflow_extensions-1.1.138.dist-info/WHEEL,sha256=bb2Ot9scclHKMOLDEHY6B2sicWOgugjFKaJsT7vwMQo,110
58
+ ob_metaflow_extensions-1.1.138.dist-info/top_level.txt,sha256=NwG0ukwjygtanDETyp_BUdtYtqIA_lOjzFFh1TsnxvI,20
59
+ ob_metaflow_extensions-1.1.138.dist-info/RECORD,,