From 13bfd70238e1a4cc2b40f2df57bfe4c491fb6b20 Mon Sep 17 00:00:00 2001
From: jakki <jarkko.lehtiranta@amd.com>
Date: Tue, 7 Jan 2025 11:08:57 +0200
Subject: [PATCH] Add comment

---
 ts_scripts/api_utils.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ts_scripts/api_utils.py b/ts_scripts/api_utils.py
index 80db6c8548..b038754d51 100755
--- a/ts_scripts/api_utils.py
+++ b/ts_scripts/api_utils.py
@@ -110,6 +110,9 @@ def cleanup_model_store():
 
 
 def move_logs(log_file, artifact_dir, retries=5):
+    """
+    Move log files to artifacts directory. If directory already exists, merge contents.
+    """
     logs_dir = os.path.join("logs")
 
     if not os.path.exists(logs_dir):
@@ -119,6 +122,7 @@ def move_logs(log_file, artifact_dir, retries=5):
 
     destination_dir = os.path.join(artifact_dir, logs_dir)
 
+    # Retry is used because the directory might not be ready to be moved.
     for attempt in range(retries):
         try:
             if os.path.exists(destination_dir):