-
Notifications
You must be signed in to change notification settings - Fork 1.2k
don't allow loading stages without cmd
#5373
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
Conversation
This was loosened when introducing parametrization. But, `foreach`..`do` should be considered first before stage's regular structure. And, cmd is made required (as it should have been) Related: iterative#5371, iterative#5370, iterative#5312
cmd = kwargs.get("cmd", "command") | ||
stage = create_stage( | ||
PipelineStage, dvc, path, name=name, cmd="", **kwargs | ||
PipelineStage, dvc, path, name=name, cmd=cmd, **kwargs |
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.
I'll look into this on later iterations. It should never be empty.
@@ -6,7 +6,7 @@ | |||
from dvc.command.status import CmdDataStatus | |||
|
|||
|
|||
def test_cloud_status(mocker): | |||
def test_cloud_status(tmp_dir, dvc, mocker): |
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.
We might need to move some of the logic in status
command to API.
@pared, I assumed "dummy stage" being a high-level concept. Could you please elaborate on that? |
@skshetry so the |
@pared That's more of a workaround for our current inability to put metrics/etc into the dvc.yaml without creating a pipeline stage. If you remember, we were discussing something like:
for the future. Do we need that workaround now? If we do, we could consider proper approach instead of bringing back a hack. CC @dberenbaum |
Would metrics optionally have dependencies in the schema above? |
@dberenbaum Not really. At least we didn't see any need for that yet. Theoretically the proposed schema could be extended with anything under specific |
I was assuming that all metrics would be defined at the top level, but it sounds like the idea is to support top-level metrics and metrics defined within stages? |
@dberenbaum I was also thinking about that, but not as a new dag in top-level metrics, but more of a high-er level thing, where in stages there are only deps and outputs(e.g. metrics.json is an output) but then at the top level you also declare that this is not only an output but also a metric. But it seems like it is convenient to have support for both options: declare metrics inside of the stages and have an ability to declare them at the top level if they don't have their own stage or choose not to have it. |
This was loosened when introducing parametrization.
But,
foreach
..do
should be considered firstbefore the stage's regular structure. And, cmd is made
required (as it should have been)
Related: #5371, #5370, #5312
❗ 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.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏