-
Notifications
You must be signed in to change notification settings - Fork 39
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
allow imports list for executequery and filterbyquery and rename to ExecuteExpression and FilterByExpression #542
Conversation
7f6f316
to
3c6c458
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #542 +/- ##
=======================================
Coverage 93.94% 93.94%
=======================================
Files 211 211
Lines 8104 8104
=======================================
Hits 7613 7613
Misses 491 491 ☔ View full report in Codecov by Sentry. |
8c4750c
to
8a86d0a
Compare
I think AssignExpression might give the impression its just adding the expression as a field. I think that if the name was ExecuteExpression is it was more clear the expression is executed. what do you think @yoavkatz @dafnapension ? |
8a86d0a
to
32f6da7
Compare
No problem in renaming. I was not sure why the expression is more 'executed' in this operator than it is by FilterByExpression. |
src/unitxt/operators.py
Outdated
""" | ||
|
||
expression: str | ||
imports_list: List[str] = [] |
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.
This is not good. as the imports_list here is assigned at the class level which means all the instances will forver use the same list
Can be fixed by first: from .dataclass import OptionalField
Then imports_list: List[str] = OptionalField(default_factory=list)
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. I missed that..
7c074d3
to
ac2b572
Compare
2c121dd
to
c499612
Compare
Signed-off-by: dafnapension <dafnashein@yahoo.com>
Signed-off-by: dafnapension <dafnashein@yahoo.com>
Signed-off-by: dafnapension <dafnashein@yahoo.com>
Signed-off-by: dafnapension <dafnashein@yahoo.com>
Signed-off-by: dafnapension <dafnashein@yahoo.com>
Signed-off-by: dafnapension <dafnashein@yahoo.com>
Signed-off-by: dafnapension <dafnashein@yahoo.com>
fb8bbb0
to
f389889
Compare
No description provided.