0
0
MLOpsdevops~20 mins

Audit trails for model decisions in MLOps - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Audit Trail Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the primary purpose of audit trails in model decisions?

Audit trails are used in machine learning operations (MLOps) to track model decisions. What is the main reason for keeping these audit trails?

ATo automatically improve model accuracy without human intervention
BTo speed up the model training process by caching previous results
CTo encrypt the model parameters for security reasons
DTo record the sequence of steps and data that led to each model decision for transparency and debugging
Attempts:
2 left
💡 Hint

Think about why you might want to review or explain a model's output later.

💻 Command Output
intermediate
2:00remaining
What is the output of this command logging a model decision?

Given the following logging command in a model inference pipeline, what will be the output in the audit log?

MLOps
import json

model_decision = {'input_id': 123, 'prediction': 'approved', 'confidence': 0.92}
log_entry = json.dumps(model_decision)
print(log_entry)
A{input_id: 123, prediction: approved, confidence: 0.92}
B['input_id', 123, 'prediction', 'approved', 'confidence', 0.92]
C{"input_id": 123, "prediction": "approved", "confidence": 0.92}
D('input_id', 123, 'prediction', 'approved', 'confidence', 0.92)
Attempts:
2 left
💡 Hint

Remember how Python's json.dumps formats dictionaries as strings.

Configuration
advanced
2:00remaining
Which configuration snippet correctly enables audit logging in a model deployment YAML?

You want to enable audit logging for model decisions in your deployment configuration. Which YAML snippet correctly sets this up?

A
audit:
  enabled: true
  log_path: /var/log/model_audit.log
  log_level: info
B
audit:
  enable: yes
  path: /var/log/model_audit.log
  level: info
C
logging:
  audit_enabled: true
  audit_log: /var/log/model_audit.log
  level: info
D
audit_log:
  active: true
  file: /var/log/model_audit.log
  severity: info
Attempts:
2 left
💡 Hint

Look for correct YAML keys and boolean values.

Troubleshoot
advanced
2:00remaining
Why does the audit trail not record model decisions despite logging enabled?

You enabled audit logging in your model deployment, but no audit entries appear in the log file. What is the most likely cause?

AThe model inference code does not call the logging function after each decision
BThe log file path is set correctly but the disk is full
CThe audit logging is enabled but the model is not deployed
DThe model decisions are encrypted and cannot be logged
Attempts:
2 left
💡 Hint

Think about what must happen in the code to create log entries.

🔀 Workflow
expert
3:00remaining
What is the correct order of steps to implement audit trails for model decisions?

Arrange the following steps in the correct order to implement audit trails for model decisions in an MLOps pipeline.

A2,1,3,4
B1,2,3,4
C1,3,2,4
D3,1,2,4
Attempts:
2 left
💡 Hint

Think about planning first, then coding, then configuring storage, then monitoring.