Skip to content

Conversation

@priorphil
Copy link
Contributor

This also allows to load models that don't support caching yet and works for models that might assign this to a different attribute (previously we set to cache_trainset_representation=True when loading, just to overwrite the attribute immediately after).

This also allows to load models that don't support caching yet and works for models that might assign this to a different attribute (previously we set to cache_trainset_representation=True when loading, just to overwrite the attribute immediately after).
@priorphil priorphil requested a review from oscarkey September 8, 2025 12:47
@CLAassistant
Copy link

CLAassistant commented Sep 8, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
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 refactors how the cache_trainset_representation setting is handled when loading a model. The change involves passing this setting as a parameter through the load_model function, instead of setting it as an attribute on the model object after it has been loaded. This is a significant improvement as it makes the model loading process more robust and flexible, especially for models that might not support caching or use a different internal attribute for it. The implementation is clean, well-documented, and correctly propagates the parameter down to the architecture factory function. The changes look solid and improve the overall design.

@priorphil priorphil requested review from LeoGrin and removed request for oscarkey September 8, 2025 12:48
Copy link
Collaborator

@LeoGrin LeoGrin left a comment

Choose a reason for hiding this comment

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

LGTM!

@priorphil priorphil merged commit 54fd7e6 into main Sep 9, 2025
10 checks passed
oscarkey pushed a commit that referenced this pull request Nov 12, 2025
…l. (#135)

* Record copied public PR 492

* Forward cache_trainset_representation to load_model. (#492)

(cherry picked from commit 54fd7e6)

---------

Co-authored-by: mirror-bot <mirror-bot@users.noreply.github.com>
Co-authored-by: Phil <philipp@priorlabs.ai>
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.

4 participants