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

Support empty queues in sinfo #64

Merged
merged 1 commit into from
Jun 4, 2024
Merged

Conversation

TaekyungHeo
Copy link
Member

@TaekyungHeo TaekyungHeo commented Jun 4, 2024

Summary

Support empty queues in sinfo

Error before bugfix.

        def parse_sinfo_output(self, sinfo_output: str, node_user_map: Dict[str, str]) -> None:
            """                                                                       
            Parse the output from the 'sinfo' command to update node states.
                                    
            Args:                
                sinfo_output (str): The output from the sinfo command.
                node_user_map (dict): A dictionary mapping node names to users.
            """                                                                       
            for line in sinfo_output.split("\n")[1:]:  # Skip the header line
                if not line.strip():                                                  
                    continue                                                          
                parts = line.split()
>               partition, _, _, _, state, nodelist = parts[:6]
E               ValueError: not enough values to unpack (expected 6, got 5)

Test Plan

Updated a test case to cover empty queues.

@amaslenn amaslenn merged commit 31d07dd into NVIDIA:main Jun 4, 2024
2 checks passed
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.

2 participants