Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdv/multi_table/hma.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ def _find_parent_id(likelihoods, num_rows):
# Some rows got singular matrix error and the rest were 0
# Fallback to num_rows on the singular matrix rows and
# keep 0s on the rest.
likelihoods = likelihoods.fillna(num_rows)
likelihoods = likelihoods.astype(float).fillna(num_rows)
else:
# at least one row got a valid likelihood, so fill the
# rows that got a singular matrix error with the mean
Expand Down
1 change: 1 addition & 0 deletions tests/integration/multi_table/test_hma.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ def test_save_and_load(self, tmp_path):
assert loaded_synthesizer.get_info() == synthesizer.get_info()
assert loaded_synthesizer.metadata.to_dict() == metadata.to_dict()

@pytest.mark.filterwarnings('error::FutureWarning')
def test_hma_primary_key_and_foreign_key_only(self):
"""Test that ``HMASynthesizer`` can handle tables with primary and foreign keys only."""
# Setup
Expand Down
1 change: 1 addition & 0 deletions tests/unit/multi_table/test_hma.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,7 @@ def test__estimate_num_columns_to_be_modeled_different_distributions(self):

assert num_table_cols == estimated_num_columns[table_name]

@pytest.mark.filterwarnings('error::FutureWarning')
def test__estimate_num_columns_to_be_modeled(self):
"""Test the estimated number of columns is exactly the number of columns to be modeled.

Expand Down