GSLC-MLOps / tests /test_inference.py
github-actions
Deploy from GitHub Actions: 4025db1ea73f71f9c2a3953aa74dd93cdedb2084
d7f4720
Raw
History Blame Contribute Delete
283 Bytes
import numpy as np
from src.train import train
from src.inference import predict_one
def test_predict_shape_and_type():
train(smoke=True) # pastikan model ada
x = np.random.rand(30) # dataset breast_cancer punya 30 fitur
out = predict_one(x)
assert out in (0, 1)