Skip to content

Commit d5097bf

Browse files
Adjust dirty join thresholds
1 parent dcb2575 commit d5097bf

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

accelforge/mapper/FFM/_join_pmappings/join_pmappings.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,19 @@ def multi_strategy_join(
271271
_pmapping_row_filter_function,
272272
)
273273

274-
resource_usage_thresholds = [0.02, 0.01, 0.001, 0.0001, 0]
274+
resource_usage_thresholds = [
275+
0.2,
276+
.1,
277+
.05,
278+
.02,
279+
.01,
280+
.005,
281+
.002,
282+
.001,
283+
.0001,
284+
.00001,
285+
0 # Give up, do full precision join
286+
]
275287
for i, threshold in enumerate(resource_usage_thresholds):
276288
for p in compressed.values():
277289
for pg in p:
@@ -342,6 +354,7 @@ def clean_compress_and_join_pmappings(
342354
lambda x: pmappings.pmapping_objects[einsum_name][x]
343355
)
344356
joined._data = _fillna_and__numeric_cast(joined.data, 0).reset_index(drop=True)
357+
joined._data = joined._data.copy() # Defrag
345358

346359
rank_variable_bounds = get_rank_variable_bounds_for_all_einsums(pmappings.spec)
347360
einsum_names = list(einsum2pmappings.keys())
@@ -943,6 +956,9 @@ def no_match_lookahead_error(
943956
# f"\tLargest right: {max(len(s2.mappings.data) for s in right.values() for s2, _ in s)}"
944957
# )
945958

959+
print(f'Total number of mappings: {sum(len(s.mappings.data) for s in combined)}')
960+
print(f'Total number of groups: {len(combined)}')
961+
946962
# ======================================================================
947963
# Update left for the next iteration.
948964
# =================================================================

0 commit comments

Comments
 (0)