diff --git a/src/sagemaker/utils.py b/src/sagemaker/utils.py index e1bd1baa4f..1d2e9fe5cb 100644 --- a/src/sagemaker/utils.py +++ b/src/sagemaker/utils.py @@ -25,6 +25,7 @@ import time import json import abc +import uuid from datetime import datetime import botocore @@ -81,6 +82,7 @@ def name_from_base(base, max_length=63, short=False): def unique_name_from_base(base, max_length=63): """Placeholder Docstring""" + random.seed(int(uuid.uuid4())) # using uuid to randomize, otherwise system timestamp is used. unique = "%04x" % random.randrange(16**4) # 4-digit hex ts = str(int(time.time())) available_length = max_length - 2 - len(ts) - len(unique)