Skip to content

Instantly share code, notes, and snippets.

@eyaltrabelsi
Last active June 21, 2024 10:24
Show Gist options
  • Save eyaltrabelsi/f9ba6c35928cd71401e7ed93fac7bda2 to your computer and use it in GitHub Desktop.
Save eyaltrabelsi/f9ba6c35928cd71401e7ed93fac7bda2 to your computer and use it in GitHub Desktop.
def test_training_reproduceable():
data = get_production_sample(pct=0.1)
data = feature_engineering(data)
train, test = split_data(data)
model_a = fit_model(train)
model_b = fit_model(train)
a_preds = model_a.predict(test)
b_preds = model_b.predict(test)
assert all(abs(a_preds - b_preds)) < 0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment