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
feat: add pass-in value of edit fields for petastorm datamodule in py… #3651
feat: add pass-in value of edit fields for petastorm datamodule in py… #3651
Conversation
…torch_lightning Signed-off-by: Xinyue Ruan <serena.rxy@gmail.com>
Signed-off-by: Xinyue Ruan <serena.rxy@gmail.com>
2f653f7
to
e1b1c6e
Compare
If this is fine, we could also support removed_fields and selected_fields 😃 |
LGTM. Let's see how CI goes. |
if self.transformation is None and self.transformation_edit_fields is None: | ||
transform_spec = None | ||
else: | ||
transform_spec = TransformSpec(func=self.transformation, edit_fields=self.transformation_edit_fields) |
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.
Can you add a comment of linking TransformSepc
constructor usage from Petastorm?
https://github.com/uber/petastorm/blob/3f248003221a648261a36189c95c8705f6ef34ad/petastorm/transform.py#L27
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.
Sure. I'll also add param for removed_fields and selected_fields then :)
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.
Since only one of removed_fields and selected_fields can be specified, I'll go with removed_fields as if you don't return a certain field, it echoes errors, but keeping extra fields should be fine.
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.
nit: add a link from petastorm for constructor of transformspec.
Unit Test Results 1 117 files - 114 1 117 suites - 114 11h 19m 49s ⏱️ - 39m 11s Results for commit 5f66963. ± Comparison against base commit 867741e. ♻️ This comment has been updated with latest results. |
Unit Test Results (with flaky tests) 1 260 files - 174 1 260 suites - 174 11h 49m 29s ⏱️ - 1h 8m 3s Results for commit 5f66963. ± Comparison against base commit 867741e. ♻️ This comment has been updated with latest results. |
Signed-off-by: Xinyue Ruan <serena.rxy@gmail.com>
Signed-off-by: Xinyue Ruan <serena.rxy@gmail.com>
9ea4ecf
to
5f66963
Compare
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.
LGTM. waiting for CI to complete and merge. Thanks!
…torch_lightning
Checklist before submitting
Description
Fixes # (issue).
#3650
Review process to land