การสร้าง Multi-Step Workflow: การประเมินโมเดล
ในแบบฝึกหัดนี้ คุณจะสร้างขั้นตอน Model Evaluation ของ multi-step workflow ที่ใช้จัดการส่วนหนึ่งของ ML lifecycle โดยใช้เมธอด run() จากโมดูล MLflow Projects และกำหนด entry point เป็น model_evaluation จากนั้นนำ model_engineering_run_id ซึ่งเป็นผลลัพธ์ที่ได้จากแบบฝึกหัดก่อนหน้ามาส่งเป็น parameter ให้กับคำสั่งนี้
MLproject ที่สร้างในขั้นตอนก่อนหน้าสามารถดูได้ใน IPython Shell โดยใช้ print(MLproject)
โมดูล mlflow ถูก import ไว้แล้ว
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
MLflow เบื้องต้น
คำแนะนำการฝึกหัด
- กำหนดเมธอด
run()จากโมดูล MLflow Projects ให้กับตัวแปรmodel_evaluation - ตั้งค่า argument ของ entry point เป็น
"model_evaluation" - กำหนด parameter ชื่อ
"run_id"โดยใช้ค่าของmodel_engineering_run_id
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
# Set the MLflow Projects run method
model_evaluation = ____.____.____(
uri="./",
# Set the entry point to model_evaluation
____="____",
# Set the parameter run_id to the run_id output of previous step
parameters={
"____": ____,
},
env_manager="local"
)
print(model_evaluation.get_status())