-
Notifications
You must be signed in to change notification settings - Fork 47
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: Allow DataFrame.join for self-join on Null index #860
Conversation
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 Trevor!
Should we add an e2e test for the .fit(X, y) table with null index / unordered mode, too?
Good idea. This revealed that ml modules were caching pre-join, which is invalidated by row-identity join. Instead, I made it cache post-join. |
bigframes/ml/core.py
Outdated
@@ -326,7 +326,7 @@ def create_model( | |||
if y_train is None: | |||
input_data = X_train.cache() | |||
else: | |||
input_data = X_train.cache().join(y_train.cache(), how="outer") | |||
input_data = X_train.join(y_train.cache(), how="outer").cache() |
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 should be y_train without cache() as well?
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.
yes, fixed
def test_unordered_mode_logistic_regression_configure_fit_score( | ||
unordered_session, penguins_table_id, dataset_id | ||
): | ||
model = bigframes.ml.linear_model.LogisticRegression() |
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.
Not a problem, but if we only pick one model to test some shared functionalities, usually the choice is LinearReg.
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.
ok, used linear regression model instead
15083b0
to
47a78bf
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> 🦕