Skip to content

Conversation

@shawnanyscale
Copy link
Contributor

No description provided.

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