引導式測驗 · 中等 等級
從 Jupyter Notebook 到生產程式碼測驗
將筆記本探索重構為可重複使用模組、明確配置、乾淨執行、測試和生產推理路徑。
問題 1 的 8
What hidden-state problem can notebooks introduce?
預覽每個問題8 問題
當您參加測驗時,就會出現答案和解釋。
- What hidden-state problem can notebooks introduce?
- Cells always execute in the order shown, regardless of user actions
- Variables are cleared automatically after each cell
- Cells may depend on variables created by earlier out-of-order execution
- Outputs rerun whenever source code is edited
- Why restart the kernel and execute every cell before relying on a notebook result?
- To preserve stale variables for later cells
- To verify the workflow runs from a clean state
- To avoid dependency and input setup
- To make model results identical on all hardware
- How can notebook analysis share a stable feature transformation with an application?
- Copy it manually into each notebook and service
- Leave it only in output cells
- Reimplement it from memory during deployment
- Move it into tested code that both notebook and application can import
- Which option makes an input location explicit without embedding it in reusable code?
- A configuration value or explicit command-line argument
- A machine-specific path embedded in the function
- A path inferred from the last working directory
- A value held only in a previous notebook kernel
- What should a production inference path do with a saved model pipeline?
- Rerun the training notebook on each request
- Fit preprocessing on incoming test labels
- Load the matching preprocessing and model artifacts
- Read variables from an old notebook kernel
- Why should notebook outputs be reviewed before committing?
- They automatically encrypt private data
- They can expose sensitive examples, grow diffs or become stale
- They guarantee the notebook will run
- They are the only place to save source code
- What does a clean nbconvert execution check provide?
- Proof of scientific validity
- A guarantee of production latency
- Automatic model monitoring
- Evidence that cells run in sequence without unhandled exceptions
- Which additional concerns remain after notebook code is extracted?
- Monitoring, permissions, latency and rollback
- Refactoring code removes any need for deployment monitoring
- Saving a Python file automatically adds rollback
- A service can safely share broad access by default