Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jakki-amd committed Jan 7, 2025
1 parent 53d525e commit 13bfd70
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ts_scripts/api_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down

0 comments on commit 13bfd70

Please sign in to comment.