Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactorto_dataframe deterministicly update progress bar.#8303

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tswast merged 5 commits intogoogleapis:masterfromtswast:issue8175-bqstorage-flake
Jun 18, 2019

Conversation

@tswast
Copy link
Contributor

Previously, a background thread was used to collect progress bar updates
from worker threads. So as not to block downloads for progress bar
updates,put_nowait was used to make progress bar updates. Missed
writes to the progress bar were ignored. This caused non-deterministic
progress bar updates and test flakiness.

Now, worker threads push dataframes to the queue, and the return values
fordownload_dataframe_bqstorage and
download_dataframe_tabledata_list have been updated to return an
iterable of pandas DataFrame objects instead of a single DataFrame. This
allows progress bar updates to be done independently of which underlying
API is used to download the DataFrames.

Also, the logic for working with pandas has been moved to the
_pandas_helpers module.

Closes#8175

Previously, a background thread was used to collect progress bar updatesfrom worker threads. So as not to block downloads for progress barupdates, `put_nowait` was used to make progress bar updates. Missedwrites to the progress bar were ignored. This caused non-deterministicprogress bar updates and test flakiness.Now, worker threads push dataframes to the queue, and the return valuesfor `download_dataframe_bqstorage` and`download_dataframe_tabledata_list` have been updated to return aniterable of pandas DataFrame objects instead of a single DataFrame. Thisallows progress bar updates to be done independently of which underlyingAPI is used to download the DataFrames.Also, the logic for working with pandas has been moved to the`_pandas_helpers` module.
@tswasttswast requested a review froma teamJune 13, 2019 23:01
@googlebotgooglebot added the cla: yesThis human has signed the Contributor License Agreement. labelJun 13, 2019
@tswasttswast requested a review fromtseaverJune 13, 2019 23:33
@plamutplamut added api: bigqueryIssues related to the BigQuery API. kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelsJun 14, 2019
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelJun 14, 2019
Copy link
Contributor

@plamutplamut left a comment

Choose a reason for hiding this comment

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

The changes generally seem fine to me, but I did leave a few comments that might be relevant - please check, just in case.

Copy link
Contributor

@plamutplamut left a comment

Choose a reason for hiding this comment

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

Looks good, and thanks for the additional explanation of the design decisions!

Will wait if the other reviewers have something else to add.

@tswasttswast merged commitfd24b4b intogoogleapis:masterJun 18, 2019
@tswasttswast deleted the issue8175-bqstorage-flake branchJune 18, 2019 23:17
# prevents the queue from filling up, because the main thread
# has smaller gaps in time between calls to the queue's get
# method. For a detailed explaination, see:
# https://friendliness.dev/2019/06/18/python-nowait/
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 great. 👍

@googleapisgoogleapis deleted a commentJul 8, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tseavertseaverAwaiting requested review from tseaver

@shollymanshollymanAwaiting requested review from shollyman

1 more reviewer

@plamutplamutplamut approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

@plamutplamut

Labels

api: bigqueryIssues related to the BigQuery API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

BigQuery: 'test_to_dataframe_w_bqstorage_nonempty' unit test flakes

4 participants

@tswast@plamut@googlebot@yoshi-kokoro

[8]ページ先頭

©2009-2025 Movatter.jp