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

Fix split by whitespaces not a single space #540

Merged
merged 1 commit into from Nov 20, 2023

Conversation

oelayan7
Copy link
Contributor

Example for a run:

output.stdout:
'habana-torch-plugin 1.14.0.71 \n'

output.stdout.split("\n")[0].split(" "):
['habana-torch-plugin', '', '', '', '', '1.14.0.71', '', '', '', '', '', '', '', '', '']
so taking the -1 will result in an empty string

output.stdout.split("\n")[0].split():
['habana-torch-plugin', '1.14.0.71']
so taking -1 will result in the version

Example for a run:
====================================
output.stdout:
'habana-torch-plugin     1.14.0.71         \n'
====================================
output.stdout.split("\n")[0].split(" "):
['habana-torch-plugin', '', '', '', '', '1.14.0.71', '', '', '', '', '', '', '', '', '']
so taking the -1 will result in an empty string
====================================
output.stdout.split("\n")[0].split():
['habana-torch-plugin', '1.14.0.71']
so taking -1 will result in the version
@regisss regisss added the run-test Run CI for PRs from external contributors label Nov 20, 2023
Copy link
Collaborator

@regisss regisss left a comment

Choose a reason for hiding this comment

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

LGTM!
I don't see this issue with Synapse AI 1.12 but your suggestion looks more robust.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@regisss regisss merged commit 3a13a01 into huggingface:main Nov 20, 2023
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-test Run CI for PRs from external contributors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants