-
-
Notifications
You must be signed in to change notification settings - Fork 379
[GSK-1617] ModelCache does not load cached results correctly on Windows #1335
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d708e14
Fix model prediction cache path (Windows compat)
mattbit c67a4a3
Only warm up cache when needed
mattbit 544a703
Cache is broken for text generation
mattbit 80a4322
Always regression outputs to float
mattbit a182512
Add error handling in model cache and fix problem with csv reader/writer
mattbit 97dc8f8
Remove class level attributes
mattbit 4cfd2c8
Allow cache to be non-persistent when uuid is not specified
mattbit 4924e2b
Merge branch 'main' into task/GSK-1617-cache-bug
mattbit 03a8b49
Fix initialization of cache path and small refinements
mattbit 54dd2f6
Merge branch 'task/GSK-1617-cache-bug' of github.com:Giskard-AI/giska…
mattbit 98449fc
Merge branch 'main' into task/GSK-1617-cache-bug
mattbit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not warm up at creation time instead of
read_from_cache?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I don’t want to warm up if the cache is disabled. But it’s still better to create the
ModelCacheobject in the model, so that it can be used if the cache is enabled at a later time.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in case cache is disabled the cleanest will be not to initialize
_cacheproperty at all and then warm it up in the ModelCache constructor depending on a cache type (in memory only vs FS backed), WDYT?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But cache can be disabled temporarily. So if we don’t initialize the
_cacheproperty at all, we would need to check if it exists at every prediction, initializing it there and possibly warm it up at prediction time, in addition to checking that cache is enabled. That’s because cache could have been disabled when model was initialized, but enabled later.In any case I would avoid doing expensive and persistent operations upon construction of the instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok let's keep it this way