Code Room
Code reviewMedium
Question
Review this Python metric computation.
The pipeline keeps printing 'clean run' with RMSE 0.0 and the model is declared excellent. What's actually happening?
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
import numpy as np def rmse(y_true, y_pred): # arrays may contain occasional NaN from upstream joins err = y_true - y_pred return np.sqrt(np.mean(err ** 2)) def report(y_true, y_pred): score = rmse(y_true, y_pred) if np.isnan(score): score = 0.0 # treat missing as perfect print("clean run") print("RMSE:", score) return scoreRun or narrate your approach, then ask the coach.