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 crash in prepare_prompt #2500

Closed
wants to merge 1 commit into from

Conversation

NikolaBorisov
Copy link
Contributor

max() is being called with empty list of arguments. Somehow there are no sequnces

max() is being called with empty list of arguments. Somehow there are no
sequnces
@NikolaBorisov
Copy link
Contributor Author

Trying to fix #2476

@NikolaBorisov
Copy link
Contributor Author

@simon-mo I'm not sure this will fix it, but number of different models running in vllm are currently crashing with #2476

@simon-mo simon-mo self-requested a review January 19, 2024 00:47
@simon-mo
Copy link
Collaborator

I think the cause must be deeper on why would the input list be empty.

@NikolaBorisov
Copy link
Contributor Author

There is assert assert len(seq_group_metadata_list) > 0. So the outer list is not empty, but the inner list could be empty.

Here is the code in schedule. seq_group.get_seqs(status=SequenceStatus.RUNNING): could return empty. We could add some code there to skip the sequence if it is empty.

        for seq_group in scheduler_outputs.scheduled_seq_groups:
            seq_data: Dict[int, SequenceData] = {}
            block_tables: Dict[int, List[int]] = {}
            for seq in seq_group.get_seqs(status=SequenceStatus.RUNNING):
                seq_id = seq.seq_id
                seq_data[seq_id] = seq.data
                block_tables[seq_id] = self.block_manager.get_block_table(seq)

            seq_group_metadata = SequenceGroupMetadata(
                request_id=seq_group.request_id,
                is_prompt=scheduler_outputs.prompt_run,
                seq_data=seq_data,
                sampling_params=seq_group.sampling_params,
                block_tables=block_tables,
                prefix=seq_group.prefix,
            )
            seq_group_metadata_list.append(seq_group_metadata)

@simon-mo
Copy link
Collaborator

Not sure whether this is the bug #2463 fixed

@NikolaBorisov
Copy link
Contributor Author

Seems likely. Let me try to test if this fixes it

@simon-mo
Copy link
Collaborator

@NikolaBorisov does #2463 fixes it?

@simon-mo
Copy link
Collaborator

I'm closing this assuming it is fixed. Please feel free to reopen.

@simon-mo simon-mo closed this Jan 23, 2024
@NikolaBorisov
Copy link
Contributor Author

@simon-mo Sorry for the late response. Yes, this problem looks fixed. But I see another issue: #2570

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.

None yet

2 participants