diff --git a/sdv/data_processing/data_processor.py b/sdv/data_processing/data_processor.py index 0f92a1943..d490a504d 100644 --- a/sdv/data_processing/data_processor.py +++ b/sdv/data_processing/data_processor.py @@ -577,8 +577,8 @@ def _create_config(self, data, columns_created_by_constraints): column_dtype = str(column_dtype).lower() for key in INTEGER_BOUNDS: if key in column_dtype: - min_value, max_value = INTEGER_BOUNDS[key] - function_kwargs = {'min': min_value, 'max': max_value} + _, max_value = INTEGER_BOUNDS[key] + function_kwargs = {'min': 0, 'max': max_value} else: function_kwargs = {'text': 'sdv-id-??????'} diff --git a/tests/integration/single_table/test_copulas.py b/tests/integration/single_table/test_copulas.py index 0e9c825a0..af6ac7234 100644 --- a/tests/integration/single_table/test_copulas.py +++ b/tests/integration/single_table/test_copulas.py @@ -348,16 +348,16 @@ def test_numerical_columns_gets_pii(): # Assert expected_sampled = pd.DataFrame({ 'id': [ - 2099712954613693783, - -152666675184636528, - 4268567557886801441, - 8596895119661928307, - 6592419880288711333, - 7082988828807721487, - -1204202270621625701, - 3831203727630084512, - -4724549333540186445, - 496832674032232864, + 1089619006166876142, + 8373046707753416652, + 9070705361670139280, + 7227045982112645011, + 3461931576753619633, + 1005734164466301683, + 3312031189447929384, + 82456842876428117, + 1819741328868365520, + 8019169766233150107, ], 'city': [ 'Danielfort', diff --git a/tests/unit/data_processing/test_data_processor.py b/tests/unit/data_processing/test_data_processor.py index c53726faa..f9bd39c75 100644 --- a/tests/unit/data_processing/test_data_processor.py +++ b/tests/unit/data_processing/test_data_processor.py @@ -1245,19 +1245,19 @@ def test__create_config(self): id_numeric_int_8_transformer = config['transformers']['id_numeric_int8'] assert isinstance(id_numeric_int_8_transformer, AnonymizedFaker) assert id_numeric_int_8_transformer.function_name == 'random_int' - assert id_numeric_int_8_transformer.function_kwargs == {'min': -128, 'max': 127} + assert id_numeric_int_8_transformer.function_kwargs == {'min': 0, 'max': 127} assert id_numeric_int_8_transformer.cardinality_rule == 'unique' id_numeric_int_16_transformer = config['transformers']['id_numeric_int16'] assert isinstance(id_numeric_int_16_transformer, AnonymizedFaker) assert id_numeric_int_16_transformer.function_name == 'random_int' - assert id_numeric_int_16_transformer.function_kwargs == {'min': -32768, 'max': 32767} + assert id_numeric_int_16_transformer.function_kwargs == {'min': 0, 'max': 32767} id_numeric_int_32_transformer = config['transformers']['id_numeric_int32'] assert isinstance(id_numeric_int_32_transformer, AnonymizedFaker) assert id_numeric_int_32_transformer.function_name == 'random_int' assert id_numeric_int_32_transformer.function_kwargs == { - 'min': -2147483648, + 'min': 0, 'max': 2147483647, }