From 888b6392bb3779e9262908e8cf7ea556bcdff632 Mon Sep 17 00:00:00 2001 From: karajan1001 Date: Mon, 1 Nov 2021 09:57:17 +0800 Subject: [PATCH] Machine:remove field `name` in config(#6892) Because our machine name now is the key value of the machine config dict. And the machine config value will been overwritten by it when the config is loaded. We can remove the field `name` from the config. --- dvc/config_schema.py | 1 - tests/func/machine/test_machine_config.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/dvc/config_schema.py b/dvc/config_schema.py index 7427825ca..24bb165ee 100644 --- a/dvc/config_schema.py +++ b/dvc/config_schema.py @@ -241,7 +241,6 @@ SCHEMA = { Lower, Choices("us-west", "us-east", "eu-west", "eu-north") ), "image": str, - "name": str, "spot": Bool, "spot_price": Coerce(float), "instance_hdd_size": Coerce(int), diff --git a/tests/func/machine/test_machine_config.py b/tests/func/machine/test_machine_config.py index dd10a9ce1..5426ffc83 100644 --- a/tests/func/machine/test_machine_config.py +++ b/tests/func/machine/test_machine_config.py @@ -16,7 +16,6 @@ from .conftest import BASIC_CONFIG [ ("region", "us-west"), ("image", "iterative-cml"), - ("name", "iterative_test"), ("spot", "True"), ("spot_price", "1.2345"), ("spot_price", "12345"), @@ -75,7 +74,6 @@ FULL_CONFIG_TEXT = textwrap.dedent( cloud = aws region = us-west image = iterative-cml - name = iterative_test spot = True spot_price = 1.2345 instance_hdd_size = 10