Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LLM] Fixed fine-tuning template username setup #129

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

shawnanyscale
Copy link
Contributor

No description provided.

@@ -33,7 +33,7 @@ def generate_model_tag(model_id: str) -> str:
"""
username = os.environ.get("ANYSCALE_USERNAME")
if username:
username = username[:5]
username = username.strip().replace(" ", "_")[:5]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this may add _ to the end sometimes

>>> username = "Kyle abcde"
>>> username = username.strip().replace(" ", "_")[:5]
>>> username
'Kyle_'

You can avoid that by following

username[:5].strip().replace(" ", "_")

But with my suggestion you could end up with username less than 5 characters sometimes

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it OK to have username less than 5?
I actually submitted a PR #126 to append username to be 5

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated logic so we never have _ in case there are issues with it and always padded it to be length 5.

I think it's okay to have username less than 5 but just in case it's length 0 for some reason, I always added padding

@shawnanyscale shawnanyscale merged commit dda18e2 into main Mar 11, 2024
1 check passed
anmscale pushed a commit that referenced this pull request Jun 22, 2024
[LLM] Fixed fine-tuning template username setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants