Module 12 · Responsible systems
Module 12: guided construction and mastery
Use this after the foundation bridge and before attempting independent practice; return to the module run instructions afterward. Read, predict, run, change, and explain. The shared runner remains the complete reference; these small steps expose its ideas.
Worked concept
A service accepts a declared set of features and applies fixed preprocessing, parameters and threshold. Rejecting invalid schemas protects an input contract, while a value within a broad numeric bound may still be unlike training data. Four historical batches are not a measured time stream.
Predict and construct
Predict the printed values, shape or rejection before running. Use the documented environment. The notebook contains this same runnable construction cell.
from practical_ml_ai.classical import classification_bundle
from practical_ml_ai.deployment import checked_predict
learning_bundle = classification_bundle()
learning_record = learning_bundle["split"]["train"].iloc[0][learning_bundle["features"]].to_dict()
print(checked_predict(learning_bundle,learning_record))
try:
checked_predict(learning_bundle,{**learning_record,"quality":7})
except ValueError as learning_error:
print("Expected rejection:",learning_error)
else:
raise AssertionError("Target input must be rejected")
Complete with less support
Implement one rejected-input test on a copy. Run both app forms and write a monitoring scenario with delayed labels, trigger, owner, investigation and rollback action.
Debug a plausible misconception
Does an input mean shift prove concept drift? Write a prediction before opening feedback. Include a counterexample or calculation, not only a definition.
Independent transfer
Compare two serving options for cost, persistence, privacy and recovery. Keep any public deployment separate from the local demonstration.
Minimum mastery evidence
Keep the evidence listed in the study workflow and name the module outcome each item supports. The criteria describe developing, meeting and extending the outcome.