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
DVCFileSystem exhibits some inconsistent behavior (I think, based on my understanding of the documentation), and I'm not sure what the intended behavior is. In particular, DVCFileSystem's get_file raises an error with rpath=lpath and rev=None from a non-default branch. But if explicitly instantiated with rev='name of branch', then the error is not raised.
Reproduce
$ cd /tmp
$ mkdir dvc-test-1
$ cd dvc-test-1
$ pdm init --python [email protected]
$ pdm add dvc==3.58.0 # not specific to this version though
$ git init
$ dvc init
$ git add .
$ git commit -m "initial commit"
$ git checkout -b train_model
$ echo 1 > model.ckpt
$ dvc add model.ckpt
$ git add .
$ git commit -m "trained first model"
I'm not sure what the intended behavior is supposed to be. The documentation for rev says "In case of a local repository, if rev is unspecified, it will default to the working directory." Is "working directory" here supposed to be git's concept of "working tree"? If so, this makes me think the behavior of fs.get_file("model.ckpt", "model.ckpt") and fs2.get_file("model.ckpt", "model.ckpt") in the example above should be identical; but one raises an error and one does not. Is this expected?
Bug Report
Description
DVCFileSystem
exhibits some inconsistent behavior (I think, based on my understanding of the documentation), and I'm not sure what the intended behavior is. In particular,DVCFileSystem
'sget_file
raises an error withrpath=lpath
andrev=None
from a non-default branch. But if explicitly instantiated withrev='name of branch'
, then the error is not raised.Reproduce
Now, from Python (e.g.,
pdm run python
):Expected
I'm not sure what the intended behavior is supposed to be. The documentation for
rev
says "In case of a local repository, if rev is unspecified, it will default to the working directory." Is "working directory" here supposed to begit
's concept of "working tree"? If so, this makes me think the behavior offs.get_file("model.ckpt", "model.ckpt")
andfs2.get_file("model.ckpt", "model.ckpt")
in the example above should be identical; but one raises an error and one does not. Is this expected?Environment information
The text was updated successfully, but these errors were encountered: