@@ -41,6 +41,7 @@ def metrics_show(
41
41
* targets : str ,
42
42
repo : Optional [str ] = None ,
43
43
rev : Optional [str ] = None ,
44
+ config : Optional [Dict ] = None ,
44
45
) -> Dict :
45
46
"""Get metrics tracked in `repo`.
46
47
@@ -69,6 +70,8 @@ def metrics_show(
69
70
hash or a dvc experiment name.
70
71
If `repo` is not a Git repo, this option is ignored.
71
72
If `None`, the current working tree will be used.
73
+ config (dict, optional): config to be passed through to DVC project.
74
+ Defaults to `None`.
72
75
73
76
Returns:
74
77
Dict: See Examples below.
@@ -136,7 +139,7 @@ def metrics_show(
136
139
https://git-scm.com/docs/revisions
137
140
"""
138
141
139
- with Repo .open (repo ) as _repo :
142
+ with Repo .open (repo , config = config ) as _repo :
140
143
metrics = _repo .metrics .show (
141
144
targets = targets ,
142
145
revs = rev if rev is None else [rev ],
@@ -157,6 +160,7 @@ def params_show(
157
160
stages : Optional [Union [str , Iterable [str ]]] = None ,
158
161
rev : Optional [str ] = None ,
159
162
deps : bool = False ,
163
+ config : Optional [Dict ] = None ,
160
164
) -> Dict :
161
165
"""Get parameters tracked in `repo`.
162
166
@@ -195,6 +199,8 @@ def params_show(
195
199
deps (bool, optional): Whether to retrieve only parameters that are
196
200
stage dependencies or not.
197
201
Defaults to `False`.
202
+ config (dict, optional): config to be passed through to DVC project.
203
+ Defaults to `None`.
198
204
199
205
Returns:
200
206
Dict: See Examples below.
@@ -379,7 +385,7 @@ def params_show(
379
385
if isinstance (stages , str ):
380
386
stages = [stages ]
381
387
382
- with Repo .open (repo ) as _repo :
388
+ with Repo .open (repo , config = config ) as _repo :
383
389
params = _repo .params .show (
384
390
revs = rev if rev is None else [rev ],
385
391
targets = targets ,
0 commit comments