パラメーター、メトリクス、アーティファクトを記録する
実行ごとにハイパーパラメーター、スコア、ファイルを記録します。
「パラメーター、メトリクス、アーティファクトを記録する」はCoddyKit上の無料MLOps Academyレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはMLOps Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 MLOps Academyコースには全4レッスンが含まれています。
このレッスンの一部はまだ翻訳されておらず、英語で表示されています。
Three Things to Log
Inside a run you capture three kinds of data: the parameters you chose, the metrics you measured, and the files you produced.
Log a Parameter
A parameter is an input you picked, like learning rate or tree depth. Log it once so you always know how a run was configured.
mlflow.log_param("learning_rate", 0.01)Log Many Params at Once
Got a whole config dict? Use log_params to record every key and value in one call instead of writing them line by line.
mlflow.log_params({"max_depth": 6, "n_estimators": 200})Log a Metric
A metric is a number your model earned, like accuracy or loss. Log it so runs can be ranked and compared later.
mlflow.log_metric("accuracy", 0.92)Metrics Can Have Steps
Metrics change over training. Pass a step to log loss at each epoch, and MLflow draws a curve you can inspect in the UI.
for epoch in range(10):
mlflow.log_metric("loss", loss, step=epoch)What an Artifact Is
An artifact is any file a run produces: a saved model, a plot, a confusion matrix image, or a CSV of predictions.
Log an Artifact
Use log_artifact to attach a local file to the run. MLflow copies it to the artifact store so it stays tied to that experiment.
mlflow.log_artifact("confusion_matrix.png")Params vs Metrics
The rule of thumb: a param is an input you control, a metric is an output you measure. Logging both makes runs fully comparable.
Tag Your Runs
Add a tag to label a run with free-form notes, like the data version or who triggered it. Tags make later searching far easier.
mlflow.set_tag("data_version", "v3")It All Lives in the Run
Every param, metric, and artifact attaches to the active run. Close the run and that snapshot is frozen forever for you to revisit.
Log Early, Log Often
Cheap to log, painful to lose. Capture everything that might matter, because you can never reconstruct a run you failed to record.
Quick Check
Let us check that you can tell params from metrics.
Recap
You logged params, metrics with steps, artifacts, and tags. A run now holds its full story, ready to compare against the rest. ✅
よくある質問
「パラメーター、メトリクス、アーティファクトを記録する」レッスンは無料ですか?
はい。「パラメーター、メトリクス、アーティファクトを記録する」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、MLOps Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 MLOps Academyコースには全4レッスンが含まれています。
「パラメーター、メトリクス、アーティファクトを記録する」で何を学びますか?
実行ごとにハイパーパラメーター、スコア、ファイルを記録します。 ブラウザで直接実行するハンズオンコードでMLOps Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
MLOps Academyを始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのMLOps Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。
「パラメーター、メトリクス、アーティファクトを記録する」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このMLOps Academyレッスンでコードを書いて実行できますか?
はい。すべてのMLOps Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。
このコースのすべてのレッスン
- MLflowをインストールして追跡を始める
- パラメーター、メトリクス、アーティファクトを記録する
- MLflow UIで実行を比較する
- 1行のコードで自動記録する