Skip to content
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

exp queue: implement dvc queue logs #7860

Merged
merged 4 commits into from
Jun 10, 2022

Conversation

pmrowla
Copy link
Contributor

@pmrowla pmrowla commented Jun 8, 2022

Thank you for the contribution - we'll try to review it as soon as possible. πŸ™

Related to #7854, #7590

  • Adds dvc queue logs [-f/--follow] command
  • Removes dvc queue attach

asciicast

@pmrowla pmrowla added A: experiments Related to dvc exp A: task-queue labels Jun 8, 2022
@pmrowla pmrowla self-assigned this Jun 8, 2022
@pmrowla pmrowla marked this pull request as ready for review June 8, 2022 08:59
@pmrowla pmrowla requested a review from a team as a code owner June 8, 2022 08:59
@pmrowla pmrowla requested review from karajan1001 and dberenbaum and removed request for a team June 8, 2022 08:59
@dberenbaum
Copy link
Collaborator

This isn't a blocker, but we should provide a more helpful error when trying to get the logs for an experiment still in the queue:

$ dvc exp show
 ──────────────────────────────────────────────────────────────────────────────────────>
  Experiment                Created        State    avg_prec   roc_auc   prepare.split >
 ──────────────────────────────────────────────────────────────────────────────────────>
  workspace                 -              -           0.925   0.94602   0.2           >
  10-bigrams-experiment     May 19, 2022   -           0.925   0.94602   0.2           >
  β”œβ”€β”€ 3911349 [exp-cb6ca]   02:48 PM       -         0.91243    0.9372   0.35          >
  β”œβ”€β”€ deef20c [exp-94dbd]   02:47 PM       -         0.91856   0.94113   0.25          >
  β”œβ”€β”€ 0f98f46 [exp-78733]   02:47 PM       -         0.92968   0.95151   0.15          >
  β”œβ”€β”€ 2620d5b [exp-8a4db]   02:47 PM       -         0.92664   0.94595   0.05          >
  β”œβ”€β”€ bdaac35               02:48 PM       Queued          -         -   0.55          >
  β”œβ”€β”€ eeca4d6               02:48 PM       Queued          -         -   0.65          >
  └── 4e2927f               02:48 PM       Queued          -         -   0.45          >
 ──────────────────────────────────────────────────────────────────────────────────────>
$ dvc queue start
Start 1 queue worker to process the queue tasks
$ dvc queue logs 4e2927f
ERROR: '4e2927f' are not valid queued experiment names

@dberenbaum
Copy link
Collaborator

dberenbaum commented Jun 8, 2022

Is there any way to indicate how to safely exit (besides in help/docs) from dvc queue logs -f? It feels scary to interrupt if you are in the middle of a long-running experiment.

@dberenbaum
Copy link
Collaborator

Should we remove dvc queue attach as part of this PR?

@dberenbaum
Copy link
Collaborator

Like #7591 (comment), it doesn't accept assigned experiment names for checkpoint experiments:

$ dvc exp show
 ──────────────────────────────────────────────────────────────────────────────────────>
  Experiment                Created        State     Executor    step      loss   accur>
 ──────────────────────────────────────────────────────────────────────────────────────>
  workspace                 -              Running   workspace      -         -        >
  dvc                       May 27, 2022   -         -              -         -        >
  β”œβ”€β”€ 24747fc [exp-10cc0]   03:25 PM       Running   temp           0    1.3277     0.7>
...
$ dvc queue logs -f exp-10cc0
ERROR: 'exp-10cc0' are not valid queued experiment names

Copy link
Collaborator

@dberenbaum dberenbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! We can merge without the UI fixes once we decide whether to remove dvc queue attach.

@pmrowla
Copy link
Contributor Author

pmrowla commented Jun 9, 2022

I went ahead and removed queue attach in this PR

This isn't a blocker, but we should provide a more helpful error when trying to get the logs for an experiment still in the queue:

We now generate a better message:

$ dvc queue logs 6acd74
ERROR: Experiment '6acd74' is in queue but has not been started

Is there any way to indicate how to safely exit (besides in help/docs) from dvc queue logs -f? It feels scary to interrupt if you are in the middle of a long-running experiment.

When using -f we now output a message telling the user they can safely Ctrl+C

$ dvc queue start
$ dvc queue logs -f 6acd74
Following logs for experiment '6acd74'. Use Ctrl+C to stop following logs (experiment execution will continue).

'data/data.xml.dvc' didn't change, skipping
Stage 'prepare' didn't change, skipping
Running stage 'featurize':
> python src/featurization.py data/prepared data/features
The input data frame data/prepared/train.tsv size is (20017, 3)
^C 

@pmrowla pmrowla merged commit 24aeacc into iterative:dvc-task-dev Jun 10, 2022
@pmrowla pmrowla deleted the exp-queue-logs branch June 10, 2022 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: experiments Related to dvc exp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants