Challenge - 5 Problems
MLflow Experiment Tracking Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
What is the primary purpose of MLflow's experiment tracking?
MLflow helps data scientists keep track of their machine learning experiments. What is the main goal of using MLflow's experiment tracking feature?
Attempts:
2 left
💡 Hint
Think about what you want to remember and compare after running many models.
✗ Incorrect
MLflow experiment tracking is designed to log and organize parameters, metrics, and models so you can compare different runs easily.
❓ Predict Output
intermediate2:00remaining
What output does this MLflow code produce?
Consider this Python code snippet using MLflow to log a parameter and a metric. What will be printed?
ML Python
import mlflow with mlflow.start_run(): mlflow.log_param('alpha', 0.5) mlflow.log_metric('rmse', 1.23) print(mlflow.active_run().info.run_id)
Attempts:
2 left
💡 Hint
mlflow.active_run().info.run_id returns a string identifier for the current run.
✗ Incorrect
The code prints the unique run ID string assigned by MLflow to the current experiment run.
❓ Model Choice
advanced1:30remaining
Which MLflow model flavor is best for saving a scikit-learn model?
You trained a scikit-learn model and want to save it with MLflow so you can load it later easily. Which MLflow model flavor should you use?
Attempts:
2 left
💡 Hint
Match the model flavor to the library you used for training.
✗ Incorrect
mlflow.sklearn is designed specifically for saving and loading scikit-learn models.
❓ Hyperparameter
advanced1:30remaining
Which hyperparameter logging method correctly records multiple hyperparameters in MLflow?
You want to log multiple hyperparameters at once in MLflow. Which code snippet correctly does this?
Attempts:
2 left
💡 Hint
Check the method name and argument type for logging multiple parameters.
✗ Incorrect
mlflow.log_params accepts a dictionary of parameter names and values to log multiple parameters at once.
❓ Metrics
expert2:00remaining
What is the value of 'accuracy' after running this MLflow code?
Given this code snippet, what will be the final logged value of the metric 'accuracy'?
ML Python
import mlflow with mlflow.start_run(): mlflow.log_metric('accuracy', 0.8) mlflow.log_metric('accuracy', 0.85) mlflow.log_metric('accuracy', 0.83, step=1) mlflow.log_metric('accuracy', 0.9, step=2) run = mlflow.active_run() metrics = mlflow.get_run(run.info.run_id).data.metrics print(metrics['accuracy'])
Attempts:
2 left
💡 Hint
Without step argument, the last logged metric overwrites previous ones at step 0.
✗ Incorrect
Metrics logged without a step overwrite previous values at step 0. The last value without step is 0.85, so metrics['accuracy'] returns 0.85.