Skip to content

Commit b98d6a4

Browse files
committed
Change Telemetry Config
1 parent b2bbd97 commit b98d6a4

2 files changed

Lines changed: 9 additions & 35 deletions

File tree

src/swiss_ai_model_launch/cli/configuration/init_wizard.py

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -93,37 +93,15 @@ class InitConfig(ChainConfiguration):
9393
prompt="What is your CSCS API key? "
9494
"(https://serving.swissai.svc.cscs.ch)",
9595
),
96-
BranchConfiguration(
97-
name="telemetry_configuration",
98-
head_configuration=OptionsConfiguration(
99-
name="telemetry",
100-
prompt="Do you want to enable telemetry to help us improve "
101-
"the product? (you can change this later in the config file)",
102-
options={
103-
"default": (
104-
"Yes",
105-
"Anonymized data will be sent to telemetry endpoint.",
106-
),
107-
"disabled": (
108-
"No",
109-
"No data will be recorded out of your usage.",
110-
),
111-
},
112-
),
113-
branches={
114-
"default": ChainConfiguration(
115-
name="telemetry_endpoint_configuration",
116-
chain=[
117-
TextConfiguration(
118-
name="telemetry_endpoint",
119-
prompt="What is the endpoint to which telemetry "
120-
"data should be sent?",
121-
default="https://sml-dev.swissai.svc.cscs.ch/launches",
122-
),
123-
],
96+
ChainConfiguration(
97+
name="telemetry_endpoint_configuration",
98+
chain=[
99+
TextConfiguration(
100+
name="telemetry_endpoint",
101+
prompt="Where to send telemetry reports?",
102+
default="https://sml-dev.swissai.svc.cscs.ch/launches",
124103
),
125-
"disabled": None,
126-
},
104+
],
127105
),
128106
],
129107
)

src/swiss_ai_model_launch/cli/main.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,7 @@ async def _main() -> None:
227227
launcher_type = config.get_non_none_value("launcher")
228228
if launcher_type == "firecrest":
229229
firecrest_client = _get_firecrest_client_from_init_config(config)
230-
telemetry_endpoint = (
231-
config.get_value("telemetry_endpoint")
232-
if config.get_non_none_value("telemetry") == "default"
233-
else None
234-
)
230+
telemetry_endpoint = config.get_non_none_value("telemetry_endpoint")
235231
launcher = await _get_firecrest_launcher_with_client(
236232
firecrest_client,
237233
telemetry_endpoint=telemetry_endpoint,

0 commit comments

Comments
 (0)