Plotting problems

I am following the tutorial at Get Started: Metrics, Plots, and Parameters.

So far everything went well but when plotting with dvc plots show I got

dvc plots show
DVC failed to load some plots for following revisions: 'workspace'.                                                                                        
file:///home/user/2024/DVC/example-get_started/dvc_plots/index.html

Also , in the repo I can see only one plot (eval/plots/images/importance.png) but curiosly that plot does not appear in dvc_lots/index.html

So my questions are

  1. What is this error and why does it happen?
  2. Why the only plot I can see, does not appear on the html page
  3. The other plots that do appear on the html page, where are they?

oh and by the way, why does the tutorial say to do git add eval when eval in in the .gitignore?

EDIT: I dont know if it is related but when I run dvc repro I get among other output

Running stage 'evaluate':                                                                                                                                  
> python src/evaluate.py model.pkl data/features
WARNING:dvclive:Some DVCLive features are unsupported in `dvc repro`.
To use DVCLive with a DVC Pipeline, run it with `dvc exp run`.
Updating lock file 'dvc.lock'                                  

Could you try to follow this link?

Paste that dvc.yaml contents from there into your dvc.yaml file and then see if dvc plots show works as expected.

those are the contents I am using in the first place. I put them after the original dvc.yaml

Would you mind sharing your dvc.yaml as well as what files you have under the eval folder?

dvc.yaml

stages:
  prepare:
    cmd: python src/prepare.py data/data.xml
    deps:
    - data/data.xml
    - src/prepare.py
    params:
    - prepare.seed
    - prepare.split
    outs:
    - data/prepared
  featurize:
    cmd: python src/featurization.py data/prepared data/features
    deps:
    - data/prepared
    - src/featurization.py
    params:
    - featurize.max_features
    - featurize.ngrams
    outs:
    - data/features
  train:
    cmd: python src/train.py data/features model.pkl
    deps:
    - data/features
    - src/train.py
    params:
    - train.min_split
    - train.n_est
    - train.seed
    outs:
    - model.pkl
  evaluate:
    cmd: python src/evaluate.py model.pkl data/features
    deps:
    - data/features
    - model.pkl
    - src/evaluate.py
    outs:
    - eval
metrics:
  - eval/metrics.json
plots:
  - ROC:
      template: simple
      x: fpr
      y:
        eval/plots/sklearn/roc/train.json: tpr
        eval/plots/sklearn/roc/test.json: tpr
  - Confusion-Matrix:
      template: confusion
      x: actual
      y:
        eval/plots/sklearn/cm/train.json: predicted
        eval/plots/sklearn/cm/test.json: predicted
  - Precision-Recall:
      template: simple
      x: recall
      y:
        eval/prc/train.json: precision
        eval/prc/test.json: precision
  - eval/importance.png

under the eval folder

.
├── metrics.json
└── plots
    ├── images
    │   └── importance.png
    └── sklearn
        ├── cm
        │   ├── test.json
        │   └── train.json
        ├── prc
        │   ├── test.json
        │   └── train.json
        └── roc
            ├── test.json
            └── train.json

6 directories, 8 files

Sorry, it looks like the indentation is wrong in the docs, which is causing the problem. We will get that fixed. You can copy the plots with the correct indentation from example-get-started/dvc.yaml at main · iterative/example-get-started · GitHub.