Skip to content
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

Refactor pulling dataset rows #617

Merged
merged 11 commits into from
Dec 19, 2024
Merged

Conversation

ilongin
Copy link
Contributor

@ilongin ilongin commented Nov 23, 2024

As we are chainging the way we export files to s3 in https://github.com/iterative/studio/pull/10966, we needed to adjust CLI code as well to have better performance.
Now we are exporting chunks to s3 "in order", which means chunks with lower index will be there first so we can use that to make sure we are fetching those chunks with lower indexes first to avoid idling until chunks are ready.

@ilongin ilongin linked an issue Nov 23, 2024 that may be closed by this pull request
@ilongin ilongin marked this pull request as draft November 23, 2024 00:45
Copy link

codecov bot commented Nov 23, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 5 lines in your changes missing coverage. Please review.

Project coverage is 87.46%. Comparing base (10e90c5) to head (8e56e86).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/datachain/catalog/catalog.py 86.66% 2 Missing and 2 partials ⚠️
src/datachain/data_storage/sqlite.py 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #617      +/-   ##
==========================================
+ Coverage   87.44%   87.46%   +0.01%     
==========================================
  Files         114      114              
  Lines       10898    10910      +12     
  Branches     1499     1501       +2     
==========================================
+ Hits         9530     9542      +12     
  Misses        990      990              
  Partials      378      378              
Flag Coverage Δ
datachain 87.39% <85.71%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

cloudflare-workers-and-pages bot commented Nov 25, 2024

Deploying datachain-documentation with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8e56e86
Status: ✅  Deploy successful!
Preview URL: https://27534ae8.datachain-documentation.pages.dev
Branch Preview URL: https://ilongin-616-refactor-datacha.datachain-documentation.pages.dev

View logs

@ilongin ilongin marked this pull request as ready for review November 25, 2024 23:19
@ilongin ilongin requested a review from a team November 25, 2024 23:20
if self.should_check_for_status():
self.check_for_status()
r = requests.get(url, timeout=PULL_DATASET_CHUNK_TIMEOUT)
if r.status_code == 404:
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry if it is a silly question. How likely is it that we will be stuck on forever loop here if the url is indeed incorrect url and returning 404 response?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch! Do we need retry counter here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, but we don't need retry counter here. 404 is expected as this particular chunk may not be exported yet into s3 (in parallel with this Studio is exporting chunks). If something actually fails and we are not able to export chunk to s3 which leads to 404 forever, export itself will fail in Studio and in this loop we are checking for export (whole export job) status on Studio as well every 20 seconds. When we realize that exporting dataset failed on Studio, we will print an error and end the loop.

@ilongin ilongin requested a review from amritghimire December 18, 2024 00:54
@ilongin ilongin merged commit 983cbd8 into main Dec 19, 2024
33 of 34 checks passed
@ilongin ilongin deleted the ilongin/616-refactor-datachain-pull branch December 19, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor pulling dataset rows from Studio
4 participants