diff --git a/dvc/commands/data_sync.py b/dvc/commands/data_sync.py index a8cae64bf..bbb8d64ec 100644 --- a/dvc/commands/data_sync.py +++ b/dvc/commands/data_sync.py @@ -194,8 +194,8 @@ def add_parser(subparsers, _parent_parser): ) pull_parser.add_argument( "--run-cache", - action="store_true", - default=False, + action=argparse.BooleanOptionalAction, + default=True, help="Fetch run history for all stages.", ) pull_parser.add_argument( @@ -262,8 +262,8 @@ def add_parser(subparsers, _parent_parser): ) push_parser.add_argument( "--run-cache", - action="store_true", - default=False, + action=argparse.BooleanOptionalAction, + default=True, help="Push run history for all stages.", ) push_parser.add_argument( @@ -324,8 +324,8 @@ def add_parser(subparsers, _parent_parser): ) fetch_parser.add_argument( "--run-cache", - action="store_true", - default=False, + action=argparse.BooleanOptionalAction, + default=True, help="Fetch run history for all stages.", ) fetch_parser.add_argument( diff --git a/dvc/commands/experiments/pull.py b/dvc/commands/experiments/pull.py index 768c21ba7..a6ef4f455 100644 --- a/dvc/commands/experiments/pull.py +++ b/dvc/commands/experiments/pull.py @@ -1,3 +1,5 @@ +import argparse + from dvc.cli import formatter from dvc.cli.command import CmdBase from dvc.cli.utils import append_doc_link @@ -81,8 +83,8 @@ def add_parser(experiments_subparsers, parent_parser): ) experiments_pull_parser.add_argument( "--run-cache", - action="store_true", - default=False, + action=argparse.BooleanOptionalAction, + default=True, help="Pull run history for all stages.", ) experiments_pull_parser.add_argument( diff --git a/dvc/commands/experiments/push.py b/dvc/commands/experiments/push.py index 31a2faa84..0f6f4e708 100644 --- a/dvc/commands/experiments/push.py +++ b/dvc/commands/experiments/push.py @@ -1,3 +1,4 @@ +import argparse from typing import Any from dvc.cli import completion, formatter @@ -120,8 +121,8 @@ def add_parser(experiments_subparsers, parent_parser): ) experiments_push_parser.add_argument( "--run-cache", - action="store_true", - default=False, + action=argparse.BooleanOptionalAction, + default=True, help="Push run history for all stages.", ) experiments_push_parser.add_argument(