-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
params: read from ParamsDependency if possible #5550
Conversation
def test_diff_deleted_config(tmp_dir, scm, dvc): | ||
tmp_dir.gen("params.yaml", "foo: bar") | ||
dvc.run(cmd="echo params.yaml", params=["foo"], single_stage=True) | ||
scm.add(["params.yaml", "Dvcfile"]) | ||
scm.commit("bar") | ||
|
||
(tmp_dir / "params.yaml").unlink() | ||
|
||
assert dvc.params.diff() == { | ||
"params.yaml": {"foo": {"old": "bar", "new": None}} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy of previous test (test_diff_deleted
).
217f647
to
c373e3e
Compare
dvc/command/experiments.py
Outdated
experiments_show_parser.add_argument( | ||
"-t", | ||
"--tracked-params", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're all (usually) "tracked", just some by Git. It's more about which ones are stage dependencies I think? So how about --deps
or --only-deps
(or --param-deps
in this case)
Context: #5451 (comment)
a04c45b
to
aa9f780
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Names LGTM. One copy edit below (repeated 3 times).
I'm a bit surprised about the amount of logic needed to achieve this at first sight. Would it be easier to make this the default behavior and add option/logic to expand the scope? Well... I guess we have an entire discussion about that somewhere so never mind.
LGTM |
Co-authored-by: Jorge Orpinel <[email protected]>
Co-authored-by: Jorge Orpinel <[email protected]>
Co-authored-by: Jorge Orpinel <[email protected]>
β I have followed the Contributing to DVC checklist.
π If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
ref: doc
params/exp show/diff --param(-deps)
Β dvc.org#2371Thank you for the contribution - we'll try to review it as soon as possible. π
Fixes #5451
The change adds new flags:
--deps
fordvc params diff
and--param-deps
fordvc exp show/diff
in order to show only those parameters that are actually used. It does not change current behaviour.Related:
iterative/enhancement-proposals#1