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
dvc metrics show doesn't output anything when called from a subdirectory of the repository.
Description
When the pipeline described in dvc.yaml is stored in a subdirectory e.g. pipeline of the repository and it contains a stage that produces a metric file e.g. metric.json within this same directory, running dvc metrics show within this directory doesn't ouptut anything. When calling dvc metrics show metric.json, the displayed path for the metric is not correct. Calling dvc metric show from the root of the repository seems to be ok. The issue was already looked at by @pared who provided the simplified script to reproduce the behavior.
Reproduce
Run the following script:
#!/bin/bash
set -exu
wsp=test_wspace
rep=test_repo
rm -rf $wsp && mkdir $wsp && pushd $wsp
main=$(pwd)
mkdir $rep && pushd $rep
git init
dvc init
echo '{"metric_val": 1}' > data.json
dvc add data.json
mkdir pipeline
pushd pipeline
dvc run -d ../data.json -m metric.json -n train cp ../data.json metric.json
git add -A
git commit -am "initial"
echo "dvc metrics show in repo subdirectory"
dvc metrics show -v
echo "dvc metrics show metric.json"
dvc metrics show -v metric.json
popd
echo "dvc metrics show in repo root"
dvc metrics show -v
Expected
The first call to dvc metrics show (in the pipeline subdirectory) doesn't output anything.
The call to to dvc metrics show metric.json (in the pipeline subdirectory) outputs:
Path metric_val../metric.json 1
The second call to dvc metrics show (in the repo root) outputs:
Path metric_valpipeline/metric.json 1
which is ok.
'-v' option only adds lines of the following form:
dvc was installed from repository on an Ubuntu 20.04 (WSL). I also have the same behavior on dvc installed with pip, within a conda environment on Ubuntu 20.04. Output of dvc doctor:
Bug Report
dvc metrics show doesn't output anything when called from a subdirectory of the repository.
Description
When the pipeline described in
dvc.yaml
is stored in a subdirectory e.g.pipeline
of the repository and it contains a stage that produces a metric file e.g.metric.json
within this same directory, runningdvc metrics show
within this directory doesn't ouptut anything. When callingdvc metrics show metric.json
, the displayed path for the metric is not correct. Callingdvc metric show
from the root of the repository seems to be ok. The issue was already looked at by @pared who provided the simplified script to reproduce the behavior.Reproduce
Run the following script:
Expected
The first call to
dvc metrics show
(in thepipeline
subdirectory) doesn't output anything.The call to to
dvc metrics show metric.json
(in thepipeline
subdirectory) outputs:The second call to
dvc metrics show
(in the repo root) outputs:which is ok.
'-v' option only adds lines of the following form:
Environment information
dvc was installed from repository on an Ubuntu 20.04 (WSL). I also have the same behavior on dvc installed with pip, within a conda environment on Ubuntu 20.04.
Output of
dvc doctor
:$ dvc doctor
Additional Information (if any):
The text was updated successfully, but these errors were encountered: