Skip to content

Bug in Bipartite Method #10

@roquelopez

Description

@roquelopez

I found a bug in Magneto when I tried to get the top1 match using the fine-tuned small language model as retriever with the bipartite algorithm as reranker. It happens when initial_matches is empty https://github.com/VIDA-NYU/data-integration-eval/blob/38a232855a2753204c6a6bc411657115e6d7a3b0/algorithms/magneto/magneto/bp_reranker.py#L73 and it becomes empty because of this: https://github.com/VIDA-NYU/data-integration-eval/blob/38a232855a2753204c6a6bc411657115e6d7a3b0/algorithms/magneto/magneto/bp_reranker.py#L67

File ../magneto/magneto/bp_reranker.py:73, in arrange_bipartite_matches(initial_matches, source_table, source_table_name, target_table, target_table_name)
     70 min_filtered_score = min(filtered_matches.values())
     72 # Calculate the scaling factor to keep scores in initial_matches just below min_filtered_score
---> 73 initial_max_score = max(initial_matches.values())
     74 scaling_factor = (
     75     (min_filtered_score - 0.01) / initial_max_score if initial_max_score > 0 else 1
     76 )
     78 # Adjust scores in initial_matches, maintaining relative differences

ValueError: max() arg is an empty sequence```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions