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

feat: Add 'Size' column for models in the list command #1919

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

github-roushan
Copy link

Describe Your Changes

  • This PR introduces a "Size" column in the Engines list sub command.
  • While the sizes of models are visible in the Cortex API reference when accessing web URLs (e.g., http://localhost:39281/#tag/engines/GET/v1/engines/llama-cpp/releases/v0.1.49 ), this information was previously missing in the Command Line Utility. This update adds the missing "Size" column to the command-line interface.

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@github-roushan
Copy link
Author

CLI output before
Screenshot from 2025-02-04 02-02-57

CLI Output After:
Screenshot from 2025-02-04 02-00-51

@@ -69,6 +69,24 @@ bool EngineListCmd::Exec(const std::string& host, int port) {
selected_variant_result.value()["version"].asString());
}

std::unordered_map<std::string, std::string> variantSizeMapping;
Copy link
Contributor

Choose a reason for hiding this comment

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

We use snake_case for variables. It would be nice if variantSizeMapping and releaseData were in the snake case format as well.

Copy link
Author

Choose a reason for hiding this comment

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

Done Fixes in the latest commit in this PR. Please check

@ohaiibuzzle
Copy link

ohaiibuzzle commented Feb 4, 2025

Isn't this just listing the size as downloaded from GitHub?

This command (cortex engines list) lists the installed engines on-device, not the GitHub downloads, so it would make sense if it shows the actual space taken up by them and not what the compressed download sizes.

This way it is showing a ~4.5MB engine installed on my systems as only 1.5MB (compressed inside a zip)

@github-roushan
Copy link
Author

Hey @ohaiibuzzle . Modified the code to include both download size and size on system

image

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.

3 participants