From 20c1f2844aab3420be61dd7d7af9c05128819515 Mon Sep 17 00:00:00 2001 From: Frances Hartwell Date: Wed, 13 Nov 2024 15:43:17 -0500 Subject: [PATCH] PARSynthesizer is not learning rounding scheme for numerical columns (#2289) --- sdv/sequential/par.py | 2 +- tests/integration/sequential/test_par.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sdv/sequential/par.py b/sdv/sequential/par.py index 13bcc8336..e3e50eb17 100644 --- a/sdv/sequential/par.py +++ b/sdv/sequential/par.py @@ -87,7 +87,7 @@ def __init__( self, metadata, enforce_min_max_values=True, - enforce_rounding=False, + enforce_rounding=True, locales=['en_US'], context_columns=None, segment_size=None, diff --git a/tests/integration/sequential/test_par.py b/tests/integration/sequential/test_par.py index 620a95cf2..0193e7a34 100644 --- a/tests/integration/sequential/test_par.py +++ b/tests/integration/sequential/test_par.py @@ -59,6 +59,7 @@ def test_par(): assert len(loss_values) == 1 assert all(sampled.groupby('store_id')['date'].is_monotonic_increasing) assert all(sampled.groupby('store_id')['date'].agg(lambda x: x.is_unique)) + assert all(sampled['total_sales'].round(2) == sampled['total_sales']) def test_column_after_date_simple():