mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-12-05 07:18:30 +01:00
exp queue: remove dvc queue attach command
This commit is contained in:
committed by
Peter Rowlands (변기호)
parent
f12091002f
commit
67cbdf6de8
@@ -1,14 +1,13 @@
|
||||
import argparse
|
||||
|
||||
from dvc.cli.utils import append_doc_link, fix_subparsers
|
||||
from dvc.commands.queue import attach, kill, logs, remove, start, status, stop
|
||||
from dvc.commands.queue import kill, logs, remove, start, status, stop
|
||||
|
||||
SUB_COMMANDS = [
|
||||
remove,
|
||||
kill,
|
||||
start,
|
||||
stop,
|
||||
attach,
|
||||
status,
|
||||
logs,
|
||||
]
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
import argparse
|
||||
import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class CmdQueueAttach(CmdBase):
|
||||
"""Attach outputs of a exp task in queue."""
|
||||
|
||||
def run(self):
|
||||
self.repo.experiments.celery_queue.attach(
|
||||
rev=self.args.experiment,
|
||||
encoding=self.args.encoding,
|
||||
)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
def add_parser(queue_subparsers, parent_parser):
|
||||
QUEUE_ATTACH_HELP = "Attach outputs of a experiment task in queue."
|
||||
queue_attach_parser = queue_subparsers.add_parser(
|
||||
"attach",
|
||||
parents=[parent_parser],
|
||||
description=append_doc_link(QUEUE_ATTACH_HELP, "queue/attach"),
|
||||
help=QUEUE_ATTACH_HELP,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
)
|
||||
queue_attach_parser.add_argument(
|
||||
"-e",
|
||||
"--encoding",
|
||||
help=(
|
||||
"Text encoding for redirected output. Defaults to"
|
||||
"`locale.getpreferredencoding()`."
|
||||
),
|
||||
)
|
||||
queue_attach_parser.add_argument(
|
||||
"experiment",
|
||||
help="Experiments in queue to attach.",
|
||||
metavar="<experiment>",
|
||||
)
|
||||
queue_attach_parser.set_defaults(func=CmdQueueAttach)
|
||||
Reference in New Issue
Block a user