Skip to content

Remove dead code#870

Merged
ericcurtin merged 5 commits intomainfrom
remove-dead-code
Apr 20, 2026
Merged

Remove dead code#870
ericcurtin merged 5 commits intomainfrom
remove-dead-code

Conversation

@ilopezluna
Copy link
Copy Markdown
Contributor

This pull request primarily removes unused or redundant code throughout the codebase. It eliminates several functions, types, and files that are no longer in use, as well as some third-party dependencies. These changes help reduce technical debt and potential confusion for future development.

Copy link
Copy Markdown
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 performs a significant cleanup by removing unused functions, structs, and dependencies across the codebase. Key changes include the removal of the llamacpp GPU detection logic and socket handling, the deletion of several builder methods in the distribution package, and the pruning of unused utility functions in the responses and TLS packages. I have no feedback to provide.

@ilopezluna ilopezluna marked this pull request as ready for review April 20, 2026 10:47
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The change in llamacpp Windows download logic now unconditionally selects the cpu variant and removes GPU capability detection (ShouldUseGPUVariant, nv-gpu-info helpers, gpuinfo_* files); if Windows GPU support is still desired, consider preserving a minimal capability check or clearly marking this as an intentional deprecation of GPU variants on Windows.
  • The new metrics.SchedulerInterface couples metrics collection to http.ResponseWriter/*http.Request; if you intend to reuse it outside HTTP handlers, consider narrowing it to the minimal non-HTTP methods needed (e.g., just returning data structures) and keeping HTTP concerns in the handler layer.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The change in `llamacpp` Windows download logic now unconditionally selects the `cpu` variant and removes GPU capability detection (`ShouldUseGPUVariant`, nv-gpu-info helpers, gpuinfo_* files); if Windows GPU support is still desired, consider preserving a minimal capability check or clearly marking this as an intentional deprecation of GPU variants on Windows.
- The new `metrics.SchedulerInterface` couples metrics collection to `http.ResponseWriter`/`*http.Request`; if you intend to reuse it outside HTTP handlers, consider narrowing it to the minimal non-HTTP methods needed (e.g., just returning data structures) and keeping HTTP concerns in the handler layer.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ilopezluna ilopezluna marked this pull request as draft April 20, 2026 10:58
The following code is actively used by the Docker Desktop backend
(pinata/common/cmd/com.docker.backend/internal/inference/manager.go):

- ShouldUseGPUVariant and ShouldUseGPUVariantLock (set via settings)
- CanUseGPU() called to detect GPU capability
- GPU detection functions (hasCUDA11CapableGPU, hasOpenCL, hasNVIDIAGPU)
- ghw, pcidb, howett.net/plist dependencies

This code appears unused within model-runner alone, but is consumed
by the closed-source Docker Desktop integration.
@ilopezluna ilopezluna marked this pull request as ready for review April 20, 2026 11:52
@ilopezluna
Copy link
Copy Markdown
Contributor Author

@sourcery-ai review

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ilopezluna ilopezluna requested a review from a team April 20, 2026 11:55
@ericcurtin ericcurtin merged commit def53d2 into main Apr 20, 2026
17 checks passed
@ericcurtin ericcurtin deleted the remove-dead-code branch April 20, 2026 16:04
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