From f70d7b841011e1cc3d74b7aa86e5949c69306fc7 Mon Sep 17 00:00:00 2001 From: Kyle Huang Date: Sat, 9 Mar 2024 21:28:31 -0600 Subject: [PATCH 1/3] update username --- templates/fine-tune-llm/train.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/fine-tune-llm/train.py b/templates/fine-tune-llm/train.py index 94b712061..5f54c9012 100644 --- a/templates/fine-tune-llm/train.py +++ b/templates/fine-tune-llm/train.py @@ -33,7 +33,9 @@ def generate_model_tag(model_id: str) -> str: """ username = os.environ.get("ANYSCALE_USERNAME") if username: - username = username[:5] + username = username.strip().replace(" ","_")[:5] + while len(username)<5: + username+=username[-1] else: username = "".join(random.choice(string.ascii_lowercase) for _ in range(5)) suffix = "".join(random.choice(string.ascii_lowercase) for _ in range(5)) From 3932e0e5cf33e34af9c97cc75b6ccbf39722d3d1 Mon Sep 17 00:00:00 2001 From: Kyle Huang Date: Sat, 9 Mar 2024 21:32:55 -0600 Subject: [PATCH 2/3] format update --- templates/fine-tune-llm/train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/fine-tune-llm/train.py b/templates/fine-tune-llm/train.py index 5f54c9012..c6322e087 100644 --- a/templates/fine-tune-llm/train.py +++ b/templates/fine-tune-llm/train.py @@ -34,8 +34,8 @@ def generate_model_tag(model_id: str) -> str: username = os.environ.get("ANYSCALE_USERNAME") if username: username = username.strip().replace(" ","_")[:5] - while len(username)<5: - username+=username[-1] + while len(username)<5: + username+=username[-1] else: username = "".join(random.choice(string.ascii_lowercase) for _ in range(5)) suffix = "".join(random.choice(string.ascii_lowercase) for _ in range(5)) From aa7a61c5a3fc1ee78b93a1b65bd74d810aa55cce Mon Sep 17 00:00:00 2001 From: Kyle Huang Date: Sat, 9 Mar 2024 21:34:09 -0600 Subject: [PATCH 3/3] format --- templates/fine-tune-llm/train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/fine-tune-llm/train.py b/templates/fine-tune-llm/train.py index c6322e087..0f11180dc 100644 --- a/templates/fine-tune-llm/train.py +++ b/templates/fine-tune-llm/train.py @@ -34,8 +34,8 @@ def generate_model_tag(model_id: str) -> str: username = os.environ.get("ANYSCALE_USERNAME") if username: username = username.strip().replace(" ","_")[:5] - while len(username)<5: - username+=username[-1] + while len(username) < 5: + username += username[-1] else: username = "".join(random.choice(string.ascii_lowercase) for _ in range(5)) suffix = "".join(random.choice(string.ascii_lowercase) for _ in range(5))