Skip to content

Add size_on_disk API to OliveModelHandler and corresponding metric#2262

Merged
xiaoyu-work merged 1 commit intomainfrom
shaahji/size_on_disk
Dec 11, 2025
Merged

Add size_on_disk API to OliveModelHandler and corresponding metric#2262
xiaoyu-work merged 1 commit intomainfrom
shaahji/size_on_disk

Conversation

@shaahji
Copy link
Collaborator

@shaahji shaahji commented Nov 17, 2025

Add size_on_disk API to OliveModelHandler and corresponding metric

Checklist before requesting a review

  • Add unit tests for this change.
  • Make sure all tests can pass.
  • Update documents if necessary.
  • Lint and apply fixes to your code by running lintrunner -a
  • Is this a user-facing change? If yes, give a description of this change to be included in the release notes.

(Optional) Issue link

@shaahji shaahji force-pushed the shaahji/size_on_disk branch from a9280ff to 3624ea4 Compare November 17, 2025 21:38
@property
def size_on_disk(self) -> int:
"""Compute size of the model on disk."""
model = self.load_model()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to count external data size?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes! Logic needs to account for weights as well.

@shaahji shaahji force-pushed the shaahji/size_on_disk branch 3 times, most recently from 986b501 to 35c8791 Compare November 20, 2025 22:53
@shaahji shaahji force-pushed the shaahji/size_on_disk branch from 35c8791 to 69d8143 Compare November 21, 2025 23:23
@xiaoyu-work xiaoyu-work merged commit dadd88e into main Dec 11, 2025
11 checks passed
@xiaoyu-work xiaoyu-work deleted the shaahji/size_on_disk branch December 11, 2025 18:50
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