Jun 21: This bug was first found and described on Slack by Sam Wachtel -- thanks!
Environment Details
Please indicate the following details about the environment in which you found the bug:
SDV version: 1.14
Python version: Any
Operating System: Any
Error Description
When using the HMASynthesizer with a FixedCombinations constraint on a child table that has multiple parent tables, the synthesizer fails to drop a column created by the fixed combinations, resulting in the following error:
File ~/Projects/sdv-dev/SDV/sdv/multi_table/hma.py:660, in HMASynthesizer._find_parent_ids(self, child_table, parent_table, child_name, parent_name, foreign_key)
657 parent_table = parent_table.set_index(primary_key)
658 num_rows = parent_table[f'__{child_name}__{foreign_key}__num_rows'].copy()
--> 660 likelihoods = self._get_likelihoods(child_table, parent_table, child_name, foreign_key)
661 return likelihoods.apply(self._find_parent_id, axis=1, num_rows=num_rows)
File ~/Projects/sdv-dev/SDV/sdv/multi_table/hma.py:619, in HMASynthesizer._get_likelihoods(self, table_rows, parent_rows, table_name, foreign_key)
616 if transformed.index.name:
617 table_rows = table_rows.set_index(transformed.index.name)
--> 619 table_rows = pd.concat([transformed, table_rows.drop(columns=transformed.columns)], axis=1)
620 for parent_id, row in parent_rows.iterrows():
621 parameters = self._extract_parameters(row, table_name, foreign_key)
....
KeyError: "['department#office'] not found in axis"
Jun 21: This bug was first found and described on Slack by Sam Wachtel -- thanks!
Environment Details
Please indicate the following details about the environment in which you found the bug:
Error Description
When using the
HMASynthesizer
with aFixedCombinations
constraint on a child table that has multiple parent tables, the synthesizer fails to drop a column created by the fixed combinations, resulting in the following error:Steps to reproduce