Skip to content

Conversation

@GarrettWu
Copy link
Contributor

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:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@GarrettWu GarrettWu requested review from shuoweil and tswast May 15, 2025 22:32
@GarrettWu GarrettWu self-assigned this May 15, 2025
@GarrettWu GarrettWu requested review from a team as code owners May 15, 2025 22:32
@GarrettWu GarrettWu requested a review from iennae May 15, 2025 22:32
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. samples Issues that are directly related to samples. labels May 15, 2025
@GarrettWu GarrettWu requested a review from shobsi May 15, 2025 22:33
assert "average_body_mass:" in out

# close session so not to affect other tests
bigframes.pandas.close_session()
Copy link
Contributor

@shobsi shobsi May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the objective is to reset the partially ordered mode to default ordering, I'm afraid that would not happen here, as the value set stills lingers on, and picked up by the next session created

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right. reset the option and moved to run_quickstart() where the option is changed.

@GarrettWu GarrettWu requested a review from shobsi May 15, 2025 22:53
@GarrettWu GarrettWu enabled auto-merge (squash) May 16, 2025 00:16
model.fit(X, y)
model.score(X, y)
# [END bigquery_bigframes_quickstart]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is better approach, thanks!. For additional sanity let's restore the original ordering mode. (The reason for this PR is because multiple tests are sharing the global session, in which case we give back what we got).

 original_ordering_mode = bpd.options.bigquery.ordering_mode # [START bigquery_bigframes_quickstart] ... # [END bigquery_bigframes_quickstart] bpd.close_session() bpd.options.bigquery.ordering_mode = original_ordering_mode
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lemme know what you think about #1743

@GarrettWu GarrettWu merged commit d937be0 into main May 16, 2025
24 checks passed
@GarrettWu GarrettWu deleted the garrettwu-fix branch May 16, 2025 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. samples Issues that are directly related to samples. size: xs Pull request size is extra small.

2 participants