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):