-
Notifications
You must be signed in to change notification settings - Fork 90
Support fixed value property in Field #962
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
Conversation
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
a3b9b83 to
13e7261
Compare
| ) | ||
| value = apply_transforms_fn(row[column], field=field) | ||
| has_source = bool(field.source) | ||
| if has_source: |
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 we should assert that source and value are mutually exclusive, and than one of them must be specified.
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, see comment below.
| for node in entry_nodes: | ||
| if isinstance(node, RecordSet) and not node.data: | ||
| for field in node.fields: | ||
| if not field.source: |
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.
Maybe this is the right place to check if field.source exists that field.value must not be present.
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.
Added logic in field.py to make sure these two members are mutually exclusive. In graph.py added logic to make sure exactly one of these two members are set.
…airs at the RecordSet level
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.
Thanks!
This change is basically mlcroissant library update to support new spec change described in pull#951.