Accuracy is useless the moment one class is rare: predict "not fraud" for everything and you are 99.8% accurate and completely worthless. Precision and recall are what replace it, and writing them once fixes which is which for good.
Write precision_recall_f1(y_true, y_pred) returning the tuple (precision, recall, f1). Both inputs are 0/1 arrays of the same length, and 1 is the positive class.
$$\text{precision} = \frac{TP}{TP + FP} \qquad \text{recall} = \frac{TP}{TP + FN} \qquad F_1 = \frac{2 \cdot P \cdot R}{P + R}$$
Every one of those denominators can be zero. When it is, the metric is 0.0, not a nan and not a crash.
Build the architecture on a canvas: place the components, configure them, connect them into a data flow, and write a short reason for each one. The AI reviewer grades your design against a rubric written specifically for this problem.
Minimum 5 components · needs a wide desktop screen