Skip to content

run/metrics: bad file format validation and error handling [qa] #4068

@jorgeorpinel

Description

@jorgeorpinel

Bug Report

I get a strange error when trying to use dvc metrics show on a plaintext metrics file:

λ dvc run -n metricsnc -M metric.txt "echo metric > metric.txt"
Running callback stage 'metricsnc' with command:
        echo metric > metric.txt
Adding stage 'metricsnc' in 'dvc.yaml'
Updating lock file 'dvc.lock'
...
λ cat dvc.yaml
...
  metricsnc:
    cmd: echo metric > metric.txt
    metrics:
    - metric.txt:
        cache: false
λ dvc metrics show
ERROR: failed to show metrics - no metric files in this repository. Use `-m/-M` options for `dvc run` to mark stage outputs as  metrics.

Questions:

  • Should dvc run try to check metrics/plots file formats and at least WARN about non-supported mime/types?
  • Why is metrics show not even finding the metrics file, which is shown in the dvc.yaml file?

UPDATE: See #4068 (comment)

Please provide information about your setup

Output of dvc version:

λ dvc version
DVC version: 1.0.0b5+766ef3
Python version: 3.8.2
Platform: Windows-10-10.0.18362-SP0
Binary: False
Package: None
Supported remotes: azure, gdrive, gs, hdfs, http, https, s3, ssh, oss
Cache: reflink - not supported, hardlink - supported, symlink - supported
Filesystem type (cache directory): ('NTFS', 'C:\\')
Repo: dvc, git
Filesystem type (workspace): ('NTFS', 'C:\\')

Additional Information (if any):

If applicable, please also provide a --verbose output of the command, eg: dvc add --verbose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhances DVCp2-mediumMedium priority, should be done, but less importantuiuser interface / interaction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions