共用方式為


刪除痕跡

您可以使用 mlflow.client.MlflowClient.delete_traces 方法,根據特定準則刪除痕跡。 此方法可讓您依 實驗標識碼時間戳上限要求標識碼來刪除追蹤。

小提示

刪除痕跡是無法復原的過程。 請確定 API 內 delete_traces 提供的設定符合刪除的預期範圍。

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
)

後續步驟