Add most basic Asset support for models #11315
Open
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.
At its core, this PR is a super small slice of this one: #10045
A fast scan of model files occurs upon startup and calling the /object_info endpoint. No hashing happens at this point in time.
Only 3 http endpoints are added:
Adds an assets database with tag support that fully reflects the work done in the previous assets PR, enabling more functionality to be added as needed without modifying database schema.
Adds an unused hashing function that uses blake3, has support for resuming hashing from midway into a file, and can accept either an absolute path as input or an open file reference.
Note: since the hashing is not enabled, requirements.txt is not updated to add
blake3as a dependency in this PR.Adding tests would make sense. The ones in the original PR are very verbose and I have not translated them yet to be in this PR.