@@ -38,9 +38,9 @@ def network_command(
3838 help = "Save the (generated or loaded) network config to YAML" ,
3939 ),
4040 generate_config : bool = typer .Option (
41- False ,
42- "--generate-config" ,
43- help = "Generate network config via LLM from population spec" ,
41+ True ,
42+ "--generate-config/--no-generate-config " ,
43+ help = "Generate network config via LLM from population spec (default: enabled) " ,
4444 ),
4545 avg_degree : float = typer .Option (
4646 20.0 , "--avg-degree" , help = "Target average degree (connections per agent)"
@@ -188,8 +188,8 @@ def network_command(
188188 Network config resolution:
189189 1. --network-config file → load from YAML
190190 2. Auto-detect scenario/name/*.network-config.yaml if it exists
191- 3. --generate-config → generate config via LLM from scenario
192- 4. None of the above → empty config (flat network, no similarity structure)
191+ 3. Generate config via LLM from scenario (default)
192+ 4. --no-generate-config → empty config (flat network, no similarity structure)
193193
194194 Prerequisites:
195195 - Agents must be sampled (run 'extropy sample' first)
@@ -258,29 +258,28 @@ def network_command(
258258 out .error (f"Failed to load scenario: { e } " )
259259 raise typer .Exit (1 )
260260
261- # Load base population spec for config generation (only if needed )
261+ # Load base population spec (needed for config generation)
262262 merged_spec = None
263- if generate_config :
264- base_pop_ref = scenario_spec .meta .base_population
265- if base_pop_ref :
266- pop_name , pop_version = _parse_base_population_ref (base_pop_ref )
267- pop_path = study_ctx .get_population_path (pop_name , pop_version )
268- try :
269- pop_spec = PopulationSpec .from_yaml (pop_path )
270- except Exception as e :
271- out .error (f"Failed to load population spec: { e } " )
272- raise typer .Exit (1 )
273-
274- # Merge attributes for config generation
275- merged_attributes = list (pop_spec .attributes )
276- if scenario_spec .extended_attributes :
277- merged_attributes .extend (scenario_spec .extended_attributes )
278- merged_spec = PopulationSpec (
279- meta = pop_spec .meta ,
280- grounding = pop_spec .grounding ,
281- attributes = merged_attributes ,
282- sampling_order = pop_spec .sampling_order ,
283- )
263+ base_pop_ref = scenario_spec .meta .base_population
264+ if base_pop_ref :
265+ pop_name , pop_version = _parse_base_population_ref (base_pop_ref )
266+ pop_path = study_ctx .get_population_path (pop_name , pop_version )
267+ try :
268+ pop_spec = PopulationSpec .from_yaml (pop_path )
269+ except Exception as e :
270+ out .error (f"Failed to load population spec: { e } " )
271+ raise typer .Exit (1 )
272+
273+ # Merge attributes for config generation
274+ merged_attributes = list (pop_spec .attributes )
275+ if scenario_spec .extended_attributes :
276+ merged_attributes .extend (scenario_spec .extended_attributes )
277+ merged_spec = PopulationSpec (
278+ meta = pop_spec .meta ,
279+ grounding = pop_spec .grounding ,
280+ attributes = merged_attributes ,
281+ sampling_order = pop_spec .sampling_order ,
282+ )
284283
285284 # Checkpoint handling
286285 resume_requested = (
0 commit comments