Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions samples/snippets/quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,7 @@ def run_quickstart(project_id: str) -> None:
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

# close session and reset option so not to affect other tests
bpd.close_session()
bpd.options.bigquery.ordering_mode = "strict"