Skip to content

[WIP] Fix vllm installation#758

Draft
ilopezluna wants to merge 2 commits intomainfrom
fix-vllm-installation
Draft

[WIP] Fix vllm installation#758
ilopezluna wants to merge 2 commits intomainfrom
fix-vllm-installation

Conversation

@ilopezluna
Copy link
Contributor

No description provided.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the installation logic by introducing a new resolveInstallAction function to centralize the decision-making process for different backends and environments. This is a positive change that improves code clarity and testability, as demonstrated by the new unit tests. However, I've identified a high-severity issue regarding code structure where state is mutated after it has been used, which could lead to confusion and bugs in the future. My review includes a suggestion to address this for improved maintainability.

Comment on lines +350 to 355
// For Desktop+WSL with vllm, override engine kind to Moby.
vllmOnWSL := false
if isWSL && opts.backend == vllm.Name {
engineKind = types.ModelRunnerEngineKindMoby
vllmOnWSL = true
}
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This logic to override engineKind for vLLM on WSL is placed after resolveInstallAction has been called. This is confusing because resolveInstallAction was called with the original engineKind, and now the state is being mutated. This can make the code harder to reason about and maintain.

To improve clarity and centralize the installation strategy, this logic should be moved to before the call to resolveInstallAction (around line 308). This ensures that resolveInstallAction operates on the effective engineKind for the installation.

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.

1 participant