-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
dvc get/import shows temporary paths #2605
Comments
For the record: we can either |
This is not only about |
An addition about global variable, which might be used as base for
with path_info_base(some_dir):
# ... path_infos are stringified differently here This will protect us from usual global var issues making it a dynamic scope variable if you know what I mean ;) |
From discord: @kurianbenoy: @efiop: specifically if os.getcwd().startswith(self.stage.repo.root_dir):
name = str(self)
else:
name = relpath(self.path_info, self.stage.repo.root_dir) and then use that @Suor: Some outs might be outside repo dir, but still "in repo", referencing them simply by name would be confusing |
So the core culprit is stringifying
I propose this logic for if not self.is_in_repo:
return self.def_path
elif <curdir isin self.repo.root_dir>:
return relpath(self.path_info, curdir)
else:
return relpath(self.path_info, self.repo.root_dir) Which means we show relative paths for the repo we are in and rel to repo root paths for all other repos. Remotes and absolute paths are always shown as is. On "a/b/c" isin "a/b" == True
"a/bc" isin "a/b" == False This would fix the issue and we won't luckily need chdirs nor a global var. P.S. As a second cleanup/refactor stage I would propose completely stop using |
Is there a reason to show temporary paths and what actions we can make on this? I'd expect to see just a file name like
model.pkl
?The text was updated successfully, but these errors were encountered: