Skip to content

Commit 0a813bb

Browse files
Dave Berenbaumdberenbaum
Dave Berenbaum
authored andcommitted
push/pull run cache by default
1 parent e82356b commit 0a813bb

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

dvc/commands/data_sync.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ def add_parser(subparsers, _parent_parser):
194194
)
195195
pull_parser.add_argument(
196196
"--run-cache",
197-
action="store_true",
198-
default=False,
197+
action=argparse.BooleanOptionalAction,
198+
default=True,
199199
help="Fetch run history for all stages.",
200200
)
201201
pull_parser.add_argument(
@@ -262,8 +262,8 @@ def add_parser(subparsers, _parent_parser):
262262
)
263263
push_parser.add_argument(
264264
"--run-cache",
265-
action="store_true",
266-
default=False,
265+
action=argparse.BooleanOptionalAction,
266+
default=True,
267267
help="Push run history for all stages.",
268268
)
269269
push_parser.add_argument(
@@ -324,8 +324,8 @@ def add_parser(subparsers, _parent_parser):
324324
)
325325
fetch_parser.add_argument(
326326
"--run-cache",
327-
action="store_true",
328-
default=False,
327+
action=argparse.BooleanOptionalAction,
328+
default=True,
329329
help="Fetch run history for all stages.",
330330
)
331331
fetch_parser.add_argument(

dvc/commands/experiments/pull.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import argparse
2+
13
from dvc.cli import formatter
24
from dvc.cli.command import CmdBase
35
from dvc.cli.utils import append_doc_link
@@ -81,8 +83,8 @@ def add_parser(experiments_subparsers, parent_parser):
8183
)
8284
experiments_pull_parser.add_argument(
8385
"--run-cache",
84-
action="store_true",
85-
default=False,
86+
action=argparse.BooleanOptionalAction,
87+
default=True,
8688
help="Pull run history for all stages.",
8789
)
8890
experiments_pull_parser.add_argument(

dvc/commands/experiments/push.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import argparse
12
from typing import Any
23

34
from dvc.cli import completion, formatter
@@ -120,8 +121,8 @@ def add_parser(experiments_subparsers, parent_parser):
120121
)
121122
experiments_push_parser.add_argument(
122123
"--run-cache",
123-
action="store_true",
124-
default=False,
124+
action=argparse.BooleanOptionalAction,
125+
default=True,
125126
help="Push run history for all stages.",
126127
)
127128
experiments_push_parser.add_argument(

0 commit comments

Comments
 (0)