`dvc.api.params_show`: More helpful error handling
See original GitHub issueBug Report
Description
Doesn’t show useful errors.
Reproduce
git clone git@github.com:iterative/pipeline-conifguration.git
cd pipeline-conifguration
- Start Python shell:
>>> import dvc.api
>>> dvc.api.params_show()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/dave/Code/dvc/dvc/api/params.py", line 267, in params_show
return _postprocess(params)
File "/Users/dave/Code/dvc/dvc/api/params.py", line 256, in _postprocess
return processed[first(processed)]
KeyError: None
Expected
I’m guessing it fails because there’s no dvc.yaml
or params.yaml
in the project root where the shell is started, but the error message doesn’t help me understand this or how to fix it.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
dvc.api.params_show()
Without arguments, this function will retrieve all parameters from all tracked param files (used in any dvc.yaml file). This applies to the current...
Read more >How do launch experiments in DVC? - Stack Overflow
I solved my problem. It is necessary, that all files (executable scripts, 'dvc.yaml', 'params.yaml') be tracked by git. In this case dvc exp ......
Read more >The ultimate guide to building maintainable Machine Learning ...
Today I'll show you how to build reproducible Machine Learning pipelines ... DVC uses a params.yam file as the default parameters file, ...
Read more >Command Line Interface · spaCy API Documentation
--help , -h, Show help message and available arguments. bool (flag) ... be resolved automatically, spaCy will show you a validation error with...
Read more >dvc - PyPI
Compare any data, code, parameters, model, or performance plots. ... It currently features experiment tracking and data management, and more features (data ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was thinking about returning an empty dict instead of raising an exception because
dvc {X} show
commands don’t fail when there is nothing to return.The contents of
params.yaml
will be returned.The
KeyError
point will be reached.A warning might be reasonable also, so at least it’s not silently returning the empty dict?