You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use DVCFileSystem's get_file method to copy a file to itself, you'll get a file with size of 0 bytes if the file size greater than COPY_PBAR_MIN_SIZE. However, if the file size is less than COPY_PBAR_MIN_SIZE, you'll get the original file back.
You end up with a 0-byte file because of this code here.
$ ls -lh model.ckpt-rw-r--r--@ 1 adam.liter wheel 0B Dec 9 17:25 model.ckpt
Expected behavior
The behavior of dvc_objects.fs.utils.copyfile should be the same for all files, regardless of file size. In particular, if copying a file to itself when the file size is greater than COPY_PBAR_MIN_SIZE, the result should not be a 0-byte file.
The text was updated successfully, but these errors were encountered:
Bug report
If you use
DVCFileSystem
'sget_file
method to copy a file to itself, you'll get a file with size of 0 bytes if the file size greater thanCOPY_PBAR_MIN_SIZE
. However, if the file size is less thanCOPY_PBAR_MIN_SIZE
, you'll get the original file back.You end up with a 0-byte file because of this code here.
Current behavior
Then from Python (e.g.,
pdm run python
):Now go back to a shell and check the file size:
Expected behavior
The behavior of
dvc_objects.fs.utils.copyfile
should be the same for all files, regardless of file size. In particular, if copying a file to itself when the file size is greater thanCOPY_PBAR_MIN_SIZE
, the result should not be a 0-byte file.The text was updated successfully, but these errors were encountered: