-
Notifications
You must be signed in to change notification settings - Fork 463
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
Refactor/document encode #2160
Refactor/document encode #2160
Conversation
1908c62
to
f481bdd
Compare
superduperdb/base/document.py
Outdated
# TODO: How about the lazy loading of the artifact? | ||
# Should this function return a callback function for getting the artifact? | ||
def _get_artifact(db, path): | ||
return db.artifact_store.get_bytes(path) |
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.
@blythed The current logic for fetching bytes from the database is handled in the artifact, which parses the reference and then retrieves the bytes. Please confirm.
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.
Yes I like the callback approach. We could use this approach also for doing downloadable artifacts at some point.
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.
So you would "forward" a getter to the Artifact
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.
Done
superduperdb/components/datatype.py
Outdated
# TODO: Need to sort out the initialization of the artifact | ||
# 1. Use x(bytes) and schema for decoding. (bytes from _blobs) | ||
# 2. Use x(reference) and schema for decoding. | ||
# 3. use _blob(reference) for decoding. (bytes from _blobs) | ||
# 4. use _blob(bytes) for decoding |
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.
@blythed Please confirm.
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 that x
is the actual decoded thing (like PIL.Image
) and blob
is the bytes
. blob
can either be a reference or pure bytes
, depending on the class.
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.
Done
f481bdd
to
7751bb6
Compare
64579e7
to
fe2afe6
Compare
fe2afe6
to
a2f59cf
Compare
Description
Related Issues
Checklist
make unit_testing
andmake integration-testing
successfully?Additional Notes or Comments