Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Machine Learning Professional All Questions

View all questions & answers for the Certified Machine Learning Professional exam

Exam Certified Machine Learning Professional topic 1 question 46 discussion

Actual exam question from Databricks's Certified Machine Learning Professional
Question #: 46
Topic #: 1
[All Certified Machine Learning Professional Questions]

A machine learning engineer is migrating a machine learning pipeline to use Databricks Machine Learning. They have programmatically identified the best run from an MLflow Experiment and stored its URI in the model_uri variable and its Run ID in the run_id variable. They have also determined that the model was logged with the name "model". Now, the machine learning engineer wants to register that model in the MLflow Model Registry with the name "best_model".
Which of the following lines of code can they use to register the model to the MLflow Model Registry?

  • A. mlflow.register_model(model_uri, "best_model")
  • B. mlflow.register_model(run_id, "best_model")
  • C. mlflow.register_model(f"runs:/{run_id}/best_model", "model")
  • D. mlflow.register_model(model_uri, "model")
  • E. mlflow.register_model(f"runs:/{run_id}/model")
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Joy999
5 months ago
Selected Answer: A
To register a model using the API, use mlflow.register_model("runs:/{run_id}/{model-path}", "{registered-model-name}").
upvoted 1 times
...
hugodscarvalho
10 months ago
Selected Answer: A
According to MLflow documentation, we need the model_uri and a model name to register it. The run_id is not necessary for registering the model itself; it might be useful for other operations, such as retrieving additional information about the run from which the model was produced. Doc: https://mlflow.org/docs/latest/python_api/mlflow.html#mlflow.register_model
upvoted 2 times
...
GVR76
10 months, 3 weeks ago
Based on the answer given below, right answer would be A
upvoted 1 times
...
BokNinja
11 months, 1 week ago
Answer is B import mlflow # Register the model model_details = mlflow.register_model( model_uri=model_uri, name="best_model" ) print("Registered model:", model_details)
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...