diff --git a/batch/batch_data.py b/batch/batch_data.py index a17ec08..2c0710b 100644 --- a/batch/batch_data.py +++ b/batch/batch_data.py @@ -65,7 +65,7 @@ def main(args): ) artifact = run.log_artifact(artifact).wait() print( - f"New `{batch_type}` batch logged as `{artifact.source_name}`.\n" + f"Executed [run]({run.url}) to log new `{batch_type}` batch as `{artifact.source_name}`.\n" f"- Iteration: {iteration}\n" f"- Iteration Stride: {stride_days} day(s)\n" f"- Total length: {history_days} day(s)" diff --git a/drift/check_drift.py b/drift/check_drift.py index 776f168..3c474a8 100644 --- a/drift/check_drift.py +++ b/drift/check_drift.py @@ -73,15 +73,12 @@ artifact = run.log_artifact(artifact).wait() # Open a github issue asking for manual review issue_title = f"Data drift detected on {train_artifact.source_name}" - drifted_features = ", ".join( - [feature for feature, drift in drift_results.items() if drift] - ) issue_body = ( - f"Drift has been detected in the following features: {drifted_features}.\n\n" - f"Please review the [logged artifact](https://wandb.ai//{run.entity}/{run.project}/artifacts/{artifact.type}/{artifact.source_name}) " - f"and the [drift report]({report_url}) to determine if the training data should be updated.\n\n" - f"If approved, link the [logged artifact](https://wandb.ai//{run.entity}/{run.project}/artifacts/{artifact.type}/{artifact.source_name}) " - f"to the training Registry (`jdoc-org/wandb-registry-dataset/training`), otherwise, close this issue." + f"Data drift has been detected when comparing the registered training dataset with recent production data.\n\n" + f"Please review the [candidate artifact](https://wandb.ai/{run.entity}/{run.project}/artifacts/{artifact.type}/{artifact.source_name}) " + f"and the [drift report]({report_url}) to determine if the registered training data should be updated.\n\n" + f"To approve the new candidate after review, link it to [the training Dataset Registry](https://wandb.ai/registry/dataset?selectionPath=jdoc-org%2Fwandb-registry-dataset%2Ftraining&view=versions) at " + f"(`jdoc-org/wandb-registry-dataset/training`), otherwise close this issue." ) issue_url = open_github_issue(issue_title, issue_body, labels=["drift", "data"]) print( @@ -93,6 +90,7 @@ else: print("> No drift detected.\n") + print(f"- [W&B Run]({run.url})") print(f"- [Full data drift report]({report_url})") # Optionally the drift detection result in a parseable format.