-
Notifications
You must be signed in to change notification settings - Fork 469
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 datatype with simpler design #2647
Refactor datatype with simpler design #2647
Conversation
91c6329
to
a667d6f
Compare
fa4881f
to
2f516fe
Compare
c955598
to
d8c1197
Compare
_fields = { | ||
'object': dill_serializer, | ||
'postprocess': dill_serializer, | ||
'preprocess': dill_serializer, | ||
} |
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.
It should be t.ClassVar
. There are similar cases in other areas as well.
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.
It is ClassVar
by default.
98bd8d2
to
0302e5b
Compare
@@ -161,8 +161,7 @@ def _fit_with_dataloaders( | |||
self.append_metrics(all_metrics) | |||
self.log(fold='VALID', iteration=iteration, **all_metrics) | |||
if self.saving_criterion(): | |||
db.replace(model, upsert=True) | |||
self.changed.update({'all_metrics', 'optimizer_state'}) |
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.
intentional? @blythed
) | ||
old_uuid = info['uuid'] | ||
except FileNotFoundError: | ||
pass |
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.
should be a warning
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.
Agreed.
superduper/components/component.py
Outdated
@@ -328,6 +366,9 @@ def create_jobs( | |||
|
|||
depends = [d for d in attr.depends if d in triggers] | |||
|
|||
# if attr_name == 'validate_in_db': | |||
# import pdb; pdb.set_trace() |
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.
remove
|
||
# :param shape: The shape of the vector | ||
# :param identifier: The identifier of the vector | ||
# """ |
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.
lot of commented code
superduper/ext/numpy/encoder.py
Outdated
# :param shape: The shape of the array. | ||
# :param bytes_encoding: The bytes encoding to use. | ||
# :param encodable: The encodable to use. | ||
# """ |
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.
commented code
0302e5b
to
534442c
Compare
Main changes in
superduper/component/datatype.py
.datatype = Datatype('my-dt', encoder=func_1, decoder=func_2)
(now just subclass)Encodable
bytes
encoding to theSchema
, disabling inline encoding without aSchema
Document.encode
output since encodables are no longer needed