Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Conversation

@louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Nov 4, 2024

Describe Your Changes

This PR updates the model's size on import as supported in the pull request. It includes minor refactoring of file size extension and consolidates features using the std::filesystem API.

Changes made

The provided git diff reflects several modifications across multiple files in the project. Here's a concise summary of these changes:

  1. gguf_parser.cc:

    • Replaced manual file size determination with std::filesystem::file_size for reliability and simplicity.
    • Removed redundant code related to the old method of fetching the file size.
  2. models.cc:

    • Introduced std::filesystem::file_size to fetch the file size when importing models, storing this size in the model_config.
  3. download_service.cc and download_service.h:

    • Removed the custom GetLocalFileSize method and replaced its usage with std::filesystem::file_size for determining file sizes.
    • The download_service.h file had the method deleted from class specifications.
    • Adjustments were made to ensure curl_easy_setopt uses the new size-fetching method directly.

These changes simplify and modernize file size handling by leveraging the C++17 <filesystem> library.

@louis-jan louis-jan force-pushed the chore/update-model-size-on-import branch from bd909a1 to 10ce225 Compare November 4, 2024 11:42
@louis-jan louis-jan requested a review from a team November 4, 2024 12:13
Copy link
Contributor

@namchuai namchuai left a comment

Choose a reason for hiding this comment

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

✅ thank you!

@louis-jan louis-jan merged commit 206650f into dev Nov 4, 2024
4 checks passed
@louis-jan louis-jan deleted the chore/update-model-size-on-import branch November 4, 2024 13:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants