次の方法で共有


トレースの削除

mlflow.client.MlflowClient.delete_tracesメソッドを使用して、特定の条件に基づいてトレースを削除できます。 このメソッドを使用すると、 実験 ID最大タイムスタンプ、または 要求 ID でトレースを削除できます。

ヒント

トレースの削除は元に戻せないプロセスです。 delete_traces API 内で指定された設定が、削除の目的の範囲を満たしていることを確認します。

import time

# Get the current timestamp in milliseconds
current_time = int(time.time() * 1000)

# Delete traces older than a specific timestamp
deleted_count = client.delete_traces(
    experiment_id="1", max_timestamp_millis=current_time, max_traces=10
)

次のステップ