Skip to content

Commit ea397da

Browse files
committed
Seed the random number generator
Signed-off-by: Khor Shu Heng <khor.heng@gojek.com>
1 parent 342c49d commit ea397da

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/e2e/test_historical_features.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
from feast.data_format import ParquetFormat
1515
from feast.staging.storage_client import get_staging_client
1616

17+
np.random.seed(0)
18+
1719

1820
@pytest.fixture(scope="function")
1921
def staging_path(pytestconfig, tmp_path):
@@ -61,8 +63,8 @@ def test_historical_features(feast_client: Client, staging_path: str):
6163
creation_date = retrieval_date - timedelta(1)
6264

6365
customers = [1001, 1002, 1003, 1004, 1005]
64-
daily_transactions = [np.random.rand(seed=0) * 10 for _ in customers]
65-
total_transactions = [np.random.rand(seed=0) * 100 for _ in customers]
66+
daily_transactions = [np.random.rand() * 10 for _ in customers]
67+
total_transactions = [np.random.rand() * 100 for _ in customers]
6668

6769
transactions_df = pd.DataFrame(
6870
{

0 commit comments

Comments
 (0)