question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set a relative path to cache dir

See original GitHub issue

DVC from sources:

$ dvc -V
0.20.0+c4295f.mod
$ git clone https://github.com/iterative/so-dataset-posts-25K
$ cd so-dataset-posts-25K/
$ dvc config cache.dir ../mycache
$ dvc pull
....
$ ls mycache # <-- it suppose to be one level up ../mycache
2f

Btw… it works just fine if I use an absolute path like in this example dvc config cache.dir /dvc-cache: https://dvc.org/doc/use-cases/multiple-data-scientists-on-a-single-machine

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
ghostcommented, Nov 24, 2018

I moved the issue to dvc.org to add a better explanation of this behavior on the docs.

0reactions
efiopcommented, Nov 24, 2018

I’ve used worktree as an example, but there other ones like include sections in git config. See https://git-scm.com/docs/git-config#_conditional_includes . And once again, relative paths in them are resolved relative to the config file location, which is correct and expected behavior. And git doesn’t introduce a separate command git include to do that single action. And I also see no reason to bloat our CLI with yet another command just to provide an implicit behavior, when we already have dvc config cache.dir that has consistent behavior on all levels.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make relative paths for cache folder in Blender
In order to make relative paths in Blender, please follow the following steps: ... Properties Tab” -> “Cache” -> Enter “//[the name of...
Read more >
cache dir | Data Version Control - DVC
Relative paths are resolved relative to the current directory and saved to config relative to the config file location. If no path is...
Read more >
Change .cache folder files paths from absolute to relative. Is it ...
Try the following: buildspec.yml version: 0.2 phases: pre_build: commands: - mkdir -p /build-directory - cp -a ${CODEBUILD_SRC_DIR}/.
Read more >
[BLENDER TIPS] Make relative paths for cache folder - Medium
Blender stores a partial path evaluated relative to the directory location of the referencing blend-file. This choice helps when you need to ...
Read more >
Cache Files - requests-cache 0.9.7 documentation
For file-based backends, the cache name will be used as a path to the cache file(s). You can use a relative path, absolute...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found