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: remove cuda toolkit error message and bring back incremental model import #3997

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

louis-jan
Copy link
Contributor

Describe Your Changes

This PR removes the irrelevant error message about missing CUDA toolkit dependencies since it’s now shipped by default. Bring back the legacy incremental model import naming convention.

Changes made

1. useDropModelBinaries.ts:

  • The name processing for file names was modified. Any spaces in the file name are now removed before the '.gguf' extension is stripped.

2. useImportModel.ts:

  • Jotai's useAtomValue was imported to access the atom state.
  • downloadedModelsAtom was added to the imports, which enables tracking of already downloaded models.
  • A new utility function, incrementalModelName, was introduced to handle naming conflicts. This function ensures that any model name duplicates are resolved by appending a number to the model's name.
  • The naming logic for models during import was updated to use incrementalModelName for unique identification.
  • Similar name processing to useDropModelBinaries.ts was applied, where spaces in model names are removed.

3. LoadModelError/index.tsx:

  • A substantial block of error-handling code related to GPU settings, CUDA toolkit, and Nvidia drivers was removed. This code was responsible for rendering specific error messages when issues were detected with the GPU runtime configuration.

Overall, these changes focus on ensuring unique model name identification, simplifying error handling by removing specific GPU-related messages, and cleaning up file name processing.

@github-actions github-actions bot added the type: bug Something isn't working label Nov 12, 2024
Copy link
Contributor

Barecheck - Code coverage report

Total: 69.47%

Your code coverage diff: 0.03% ▴

Uncovered files and lines
FileLines
web/hooks/useImportModel.ts47, 66-68, 70, 106, 113-114, 126-127, 132, 134-135
web/screens/Thread/ThreadCenterPanel/LoadModelError/index.tsx19-24, 26, 28-29, 36, 42, 53-55, 58, 75

@louis-jan louis-jan merged commit 20c467e into dev Nov 12, 2024
11 checks passed
@louis-jan louis-jan deleted the fix/model-import-name branch November 12, 2024 06:11
@github-actions github-actions bot added this to the v0.5.8 milestone Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants