-
Notifications
You must be signed in to change notification settings - Fork 52
refactor: introduce ai operator namespace and deprecated semantics #1511
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
Changes from 10 commits
ff31b7e
a9b2776
df640c2
1bb3d6f
5db0d33
238d098
fdd36ad
db59f44
2a70886
f7625ac
bcb5bcf
20b4cfe
fd37607
befd87a
1b1fce8
6ae8dfe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ class ExperimentOptions: | |
|
||
def __init__(self): | ||
self._semantic_operators: bool = False | ||
self._ai_operators: bool = False | ||
self._blob: bool = False | ||
self._udf: bool = False | ||
|
||
|
@@ -41,6 +42,20 @@ def semantic_operators(self, value: bool): | |
warnings.warn(msg, category=bfe.PreviewWarning) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the experiment_options for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
self._semantic_operators = value | ||
|
||
@property | ||
def ai_operators(self) -> bool: | ||
return self._ai_operators | ||
|
||
@ai_operators.setter | ||
def ai_operators(self, value: bool): | ||
if value is True: | ||
msg = bfe.format_message( | ||
"AI operators are still under experiments, and are subject " | ||
"to change in the future." | ||
) | ||
warnings.warn(msg, category=bfe.PreviewWarning) | ||
self._ai_operators = value | ||
|
||
@property | ||
def blob(self) -> bool: | ||
return self._blob | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -74,6 +74,7 @@ | |||||
import bigframes.operations as ops | ||||||
import bigframes.operations.aggregations | ||||||
import bigframes.operations.aggregations as agg_ops | ||||||
import bigframes.operations.ai | ||||||
import bigframes.operations.plotting as plotting | ||||||
import bigframes.operations.semantics | ||||||
import bigframes.operations.structs | ||||||
|
@@ -4574,4 +4575,12 @@ def _throw_if_null_index(self, opname: str): | |||||
|
||||||
@property | ||||||
def semantics(self): | ||||||
warnings.warn( | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please format the warning message as below:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tswast for suggestions too.
|
||||||
"The 'semantic' property will be removed. Please use 'ai' instead.", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||||||
FutureWarning, | ||||||
) | ||||||
return bigframes.operations.semantics.Semantics(self) | ||||||
|
||||||
@property | ||||||
def ai(self): | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this need a docstring? Also, please add the as well as thhe table of contents
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
return bigframes.operations.ai.Ai(self) |
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.
Also update the docstring as the semantic ops here. Also, mark semantic_ops as deprecated in the docstring too?
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