フリー問題

Databricks Certified Machine Learning Professional のフリー問題 13 / 20 問目

問題文

A team wants to add unit tests to a training notebook that currently contains 400 lines of sequential code. Which change makes unit testing possible?

選択肢

  1. Add assertions between the cells of the notebook so that the notebook fails fast when an intermediate value is unexpected, and a failing cell stops the run at the point where the value went wrong.
  2. Reduce the training data to a small sample so that the notebook runs quickly enough to be executed on every commit, so a failure appears in the commit cycle.
  3. Extract the transformation logic into named functions that take inputs and return outputs, so each function can be called with fixed inputs and checked against expected results, since a test needs a callable unit with a contract.
  4. Move the notebook into a repository and enable version control, because tests can only run against files that are tracked, and the runner looks there for them.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。