最良のモデルをProductionへ昇格させる
最適なモデルを選び、提供用のステージに移します。
「最良のモデルをProductionへ昇格させる」はCoddyKit上の無料MLOps Academyレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはMLOps Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 MLOps Academyコースには全4レッスンが含まれています。
このレッスンの一部はまだ翻訳されておらず、英語で表示されています。
Pick a Winner
You now have several registered versions. Promotion is choosing which one your service should actually use, then marking it as Production. 🏆
List the Versions
Use the MlflowClient to fetch every version of a model so you can compare them before choosing.
from mlflow import MlflowClient
client = MlflowClient()
versions = client.search_model_versions("name='churn-classifier'")Compare by Metric
Each version links back to its run, so you can read that run's accuracy and pick the highest scorer programmatically.
for v in versions:
run = client.get_run(v.run_id)
print(v.version, run.data.metrics["accuracy"])Aliases Over Stages
Newer MLflow uses named aliases like champion instead of fixed stages. An alias is a movable pointer to one chosen version.
Set the Champion Alias
Point the champion alias at your best version. Your serving code can then always ask for champion and get the current pick.
client.set_registered_model_alias(
name="churn-classifier",
alias="champion",
version="3",
)Stages Still Work
On older setups you transition a version to the Production stage instead. The idea is the same: mark which one is live.
client.transition_model_version_stage(
name="churn-classifier",
version=3,
stage="Production",
)Archive the Old One
When you promote a new version, move the previous live one aside. With stages that means Archived; with aliases you simply reassign the pointer.
Tag the Decision
Add a tag recording why this version won. Future teammates will thank you for the breadcrumb when they audit the choice.
client.set_model_version_tag(
"churn-classifier", "3",
"approved_by", "data-team",
)Promotion Is Reversible
Because old versions are kept, you can re-point champion back to a previous version instantly if the new one misbehaves. 🔁
Quick Check
What is the main advantage of a model alias like champion?
Serving Stays Decoupled
The big win: your API never names version 3. It asks for the champion, so promotion is a registry change, not a code deploy.
Promote With Confidence
Compare, then promote only what beats the current pick. Tying promotion to metrics keeps weak models out of production.
Recap: Choosing the Live Model
You listed versions, compared metrics, set the champion alias, tagged the reason, and kept the choice reversible. That is safe promotion. ✅
よくある質問
「最良のモデルをProductionへ昇格させる」レッスンは無料ですか?
はい。「最良のモデルをProductionへ昇格させる」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、MLOps Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 MLOps Academyコースには全4レッスンが含まれています。
「最良のモデルをProductionへ昇格させる」で何を学びますか?
最適なモデルを選び、提供用のステージに移します。 ブラウザで直接実行するハンズオンコードでMLOps Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
MLOps Academyを始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのMLOps Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。
「最良のモデルをProductionへ昇格させる」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このMLOps Academyレッスンでコードを書いて実行できますか?
はい。すべてのMLOps Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。
このコースのすべてのレッスン
- 学習してレジストリに記録する
- 最良のモデルをProductionへ昇格させる
- Productionモデルを提供する
- 予測のラウンドトリップを追跡する