fix: Fix issue with invalid sql generated by ml distance functions#865
fix: Fix issue with invalid sql generated by ml distance functions#865TrevorBergeron merged 4 commits intomainfrom
Conversation
| self.model_name | ||
| ) | ||
|
|
||
| def _predict_sql( |
There was a problem hiding this comment.
Why change the naming? It isn't only used for "predict".
There was a problem hiding this comment.
I'm open to suggestions, previous name was very generic. Seems that the class of methods is tvfs that take a tables and add a new transform/prediction/classifiction result column from values in the input table.
There was a problem hiding this comment.
What it does is actually executing an ML TVF function and return output as a dataframe. Maybe _exec_ml_tvf? predict is misleading.
| col_y: str, | ||
| type: Literal["EUCLIDEAN", "MANHATTAN", "COSINE"], | ||
| source_df: bpd.DataFrame, | ||
| source_sql: str, |
There was a problem hiding this comment.
Is it needed to make this change?
If possible I would rather to let SQL generations stay in sql.py.
There was a problem hiding this comment.
Generally, want to invert the dependency between domain objects and sql. Will need to further factor things into a common sql generation module anyways (ml and core bigframes have separate sql modules)
962d7e5 to
3e9af02
Compare
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕