From 58df54512b9c956507968414022dee18e4debaf7 Mon Sep 17 00:00:00 2001 From: Kerry He Date: Wed, 11 Mar 2026 18:11:14 +1100 Subject: [PATCH 1/2] Support labels in experiments --- src/hive_cli/config.py | 5 +++++ src/hive_cli/platform/k8s.py | 1 + 2 files changed, 6 insertions(+) diff --git a/src/hive_cli/config.py b/src/hive_cli/config.py index 6ecf338..d4afab1 100644 --- a/src/hive_cli/config.py +++ b/src/hive_cli/config.py @@ -236,6 +236,11 @@ class HiveConfig(BaseModel): description="Provider configuration for the experiment.", ) + labels: Optional[str] = Field( + default=None, + description="Comma-separated labels for the experiment, e.g. 'label:value,tag'. Labels without a value are treated as tags.", + ) + log_level: str = Field( default="INFO", enumerated=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"], diff --git a/src/hive_cli/platform/k8s.py b/src/hive_cli/platform/k8s.py index bdf76df..7092770 100644 --- a/src/hive_cli/platform/k8s.py +++ b/src/hive_cli/platform/k8s.py @@ -290,6 +290,7 @@ def construct_experiment(name: str, namespace: str, config: HiveConfig) -> dict: }, "spec": { "projectName": config.project_name, + "labels": config.labels, "coordinatorConfigName": config.coordinator_config_name, "sandbox": { "image": config.sandbox.image, From 556f09d9ed61ecb22c7d5f7080133cbca2088d3e Mon Sep 17 00:00:00 2001 From: Kerry He Date: Thu, 12 Mar 2026 12:25:54 +1100 Subject: [PATCH 2/2] Change label to tags --- src/hive_cli/config.py | 10 +++++----- src/hive_cli/platform/k8s.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/hive_cli/config.py b/src/hive_cli/config.py index d4afab1..6352230 100644 --- a/src/hive_cli/config.py +++ b/src/hive_cli/config.py @@ -199,6 +199,11 @@ class HiveConfig(BaseModel): description="The name of the project. Must be all lowercase.", ) + tags: Optional[list[str]] = Field( + default=None, + description="Tags to apply to the experiment, e.g. ['production', 'test'].", + ) + token_path: str = Field( default=os.path.expandvars("$HOME/.kube/config"), description="Path to the auth token file, default to ~/.kube/config", @@ -236,11 +241,6 @@ class HiveConfig(BaseModel): description="Provider configuration for the experiment.", ) - labels: Optional[str] = Field( - default=None, - description="Comma-separated labels for the experiment, e.g. 'label:value,tag'. Labels without a value are treated as tags.", - ) - log_level: str = Field( default="INFO", enumerated=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"], diff --git a/src/hive_cli/platform/k8s.py b/src/hive_cli/platform/k8s.py index 7092770..7f7beac 100644 --- a/src/hive_cli/platform/k8s.py +++ b/src/hive_cli/platform/k8s.py @@ -290,7 +290,7 @@ def construct_experiment(name: str, namespace: str, config: HiveConfig) -> dict: }, "spec": { "projectName": config.project_name, - "labels": config.labels, + "tags": config.tags, "coordinatorConfigName": config.coordinator_config_name, "sandbox": { "image": config.sandbox.image,