mloda 0.3.2__py3-none-any.whl → 0.3.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mloda
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Rethinking Data and Feature Engineering
5
5
  Author-email: Tom Kaltofen <info@mloda.ai>
6
6
  License: Apache-2.0
@@ -1,5 +1,5 @@
1
- mloda-0.3.2.dist-info/licenses/LICENSE.TXT,sha256=gmhQwSkHxjiShsqQ1FpJ-20YFtaa4vRCE7aCx55-6nk,11366
2
- mloda-0.3.2.dist-info/licenses/NOTICE.md,sha256=Hu10B2sPnGLIHxZ4QhACSLLxukJpeJzjvkzCu48q5fY,520
1
+ mloda-0.3.3.dist-info/licenses/LICENSE.TXT,sha256=gmhQwSkHxjiShsqQ1FpJ-20YFtaa4vRCE7aCx55-6nk,11366
2
+ mloda-0.3.3.dist-info/licenses/NOTICE.md,sha256=Hu10B2sPnGLIHxZ4QhACSLLxukJpeJzjvkzCu48q5fY,520
3
3
  mloda_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  mloda_core/abstract_plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  mloda_core/abstract_plugins/abstract_feature_group.py,sha256=I3fVEULHUtrvPoc94iyxyBQVacD7GGI5piqJ6FoqgAY,18435
@@ -70,7 +70,7 @@ mloda_core/prepare/identify_feature_group.py,sha256=U0oFNVrR1pN7MAQVfXZ8rP-SKuCr
70
70
  mloda_core/prepare/joinstep_collection.py,sha256=_uy4NdWdFCR30K-p_pUgaF9Zn2l-7cdwM6_jM2zzE-M,1464
71
71
  mloda_core/prepare/resolve_compute_frameworks.py,sha256=NA1VdilKsLOnfo0CXpgR2qUiogFEVBMdkupsXQwjyPs,6347
72
72
  mloda_core/prepare/resolve_graph.py,sha256=i79p3OOSBqlRC-XzQYM2Bm-tNWy3CJU5d7SQbFxOLVU,3576
73
- mloda_core/prepare/resolve_links.py,sha256=JqoMzIzGhPmwmQk4tvOW083X333A0zoBWqDtSme3rz8,15405
73
+ mloda_core/prepare/resolve_links.py,sha256=Hx5bRZLstQiEEVS1sqHTbftfrtMIdgXXaOlYmqhCwN8,15919
74
74
  mloda_core/prepare/graph/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
75
  mloda_core/prepare/graph/build_graph.py,sha256=Ex2nFaCv1WRY2xO18_Zt0IsoRfj5xZMBXvS-sPcOTb8,2209
76
76
  mloda_core/prepare/graph/graph.py,sha256=nhtVkT1Hg9oZff_QSk9J17KQKn0Zh4AC69p_1aHAjA0,3818
@@ -223,8 +223,8 @@ mloda_plugins/function_extender/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
223
223
  mloda_plugins/function_extender/base_implementations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
224
224
  mloda_plugins/function_extender/base_implementations/otel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
225
225
  mloda_plugins/function_extender/base_implementations/otel/otel_extender.py,sha256=qY-oBOh6UUDtkUzGJjzC2dT3KKxyvt3sgwXJH2lWLYY,743
226
- mloda-0.3.2.dist-info/METADATA,sha256=U_SIP63u-GoR9fAKLbmJmB4cGcu0CzGdgP_whLt--bE,16633
227
- mloda-0.3.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
228
- mloda-0.3.2.dist-info/entry_points.txt,sha256=f7hp7s4laABj9eN5YwEjQAyInF-fa687MXdz-hKYMIA,80
229
- mloda-0.3.2.dist-info/top_level.txt,sha256=KScNbTs4_vV-mJ1pIlP6cyvMl611B3hNxVYj2hA0Ex4,25
230
- mloda-0.3.2.dist-info/RECORD,,
226
+ mloda-0.3.3.dist-info/METADATA,sha256=me70MqVWqB-0q7ycZHD5CPqxP680TvWCwsKyu0E34nA,16633
227
+ mloda-0.3.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
228
+ mloda-0.3.3.dist-info/entry_points.txt,sha256=f7hp7s4laABj9eN5YwEjQAyInF-fa687MXdz-hKYMIA,80
229
+ mloda-0.3.3.dist-info/top_level.txt,sha256=KScNbTs4_vV-mJ1pIlP6cyvMl611B3hNxVYj2hA0Ex4,25
230
+ mloda-0.3.3.dist-info/RECORD,,
@@ -327,26 +327,37 @@ class ResolveLinks:
327
327
  def _select_most_specific_links(self, links: List[Link], left_fg: type, right_fg: type) -> List[Link]:
328
328
  """Select links that are most specific (closest in inheritance hierarchy).
329
329
 
330
- For each link, calculates the inheritance distance on both sides.
331
- Only considers links where both sides have the same inheritance distance
332
- (to avoid sibling mismatches). Returns links with the minimum distance.
330
+ For self-joins, requires balanced inheritance distance to prevent sibling mismatches.
331
+ For non-self-joins with unrelated classes, accepts asymmetric polymorphic+exact matches.
333
332
  """
334
333
  if not links:
335
334
  return []
336
335
 
337
- # Calculate distance for each link, filtering out unbalanced matches
338
336
  link_distances: List[Tuple[Link, int]] = []
339
337
  for link in links:
340
338
  left_dist = self._inheritance_distance(left_fg, link.left_feature_group)
341
339
  right_dist = self._inheritance_distance(right_fg, link.right_feature_group)
342
340
 
343
- # Only consider links where both sides have the same inheritance level
344
- # This prevents sibling class mismatches for self-join patterns
345
341
  link_is_self_join = link.left_feature_group == link.right_feature_group
346
- # For self-joins: require same concrete class to prevent sibling mismatches
347
- # For different-class joins: balanced distance is sufficient
348
- if left_dist == right_dist and (not link_is_self_join or left_fg == right_fg):
342
+
343
+ if link_is_self_join:
344
+ # For self-joins: require same concrete class and balanced inheritance
345
+ if left_fg == right_fg and left_dist == right_dist:
346
+ link_distances.append((link, left_dist))
347
+ elif left_dist == right_dist:
348
+ # Balanced match (both exact or both polymorphic at same level)
349
349
  link_distances.append((link, left_dist))
350
+ else:
351
+ # Check if asymmetric match is allowed
352
+ # Only allow when one side is exact (distance 0) AND
353
+ # the Link's classes are not related by inheritance
354
+ # (to prevent sibling class mismatches)
355
+ link_classes_related = issubclass(link.left_feature_group, link.right_feature_group) or issubclass(
356
+ link.right_feature_group, link.left_feature_group
357
+ )
358
+ if not link_classes_related and (left_dist == 0 or right_dist == 0):
359
+ max_dist = max(left_dist, right_dist)
360
+ link_distances.append((link, max_dist))
350
361
 
351
362
  if not link_distances:
352
363
  return []
File without changes