-
Notifications
You must be signed in to change notification settings - Fork 21
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
fs: use generic.copy in put() and get() #214
Conversation
@hemker can you try this patch and verify that it resolves your issue with (Your existing PR works, but this way we don't have to deal with monkey-patching fsspec) in your DVC env:
|
executor = ThreadPoolExecutor(max_workers=jobs, cancel_on_error=True) | ||
with executor: | ||
list(executor.imap_unordered(get_file, from_infos, to_infos)) | ||
copy( |
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.
we could use transfer
here to get reflinking instead of copy
in the event we are only doing local->local operation on an fs that supports reflinks, but using copy
keeps us consistent with existing get()/put()
behavior
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #214 +/- ##
==========================================
+ Coverage 64.48% 64.95% +0.46%
==========================================
Files 25 25
Lines 1940 1926 -14
Branches 307 303 -4
==========================================
Hits 1251 1251
+ Misses 634 620 -14
Partials 55 55
☔ View full report in Codecov by Sentry. |
@pmrowla Thanks for your fast reply! |
Hey @pmrowla , great stuff! What's the status here, how do you want to proceed? |
One of the fsspec maintainers was looking into fixing the issue upstream and adding support for escaping the glob characters, so I was waiting to see what happens on that end fsspec/filesystem_spec#1306 As we discussed a while back I'm still not sure it's a good idea for us to completely replace fsspec |
Closing in favor of iterative/dvc#9753 |
Fixes iterative/dvc#8964
Closes #212
fs.get()
/fs.put()
with ourgeneric.copy
implementationfs.expand_path
(since we already do any needed recursive dir expansion viafind()
)get()
/put()
work the same asgeneric.transfer
)get()
atomic at the file level