@@ -60,6 +60,10 @@ struct Args {
6060 #[ arg( long) ]
6161 endpoint : String ,
6262
63+ /// Model name for the target component (optional)
64+ #[ arg( long) ]
65+ model_name : String ,
66+
6367 /// Polling interval in seconds for scraping dynamo endpoint stats (minimum 1 second)
6468 #[ arg( long, default_value = "1" ) ]
6569 poll_interval : u64 ,
@@ -109,6 +113,7 @@ fn get_config(args: &Args) -> Result<LLMWorkerLoadCapacityConfig> {
109113 Ok ( LLMWorkerLoadCapacityConfig {
110114 component_name : args. component . clone ( ) ,
111115 endpoint_name : args. endpoint . clone ( ) ,
116+ model_name : Some ( args. model_name . clone ( ) ) ,
112117 } )
113118}
114119
@@ -120,7 +125,9 @@ async fn app(runtime: Runtime) -> Result<()> {
120125 let drt = DistributedRuntime :: from_settings ( runtime. clone ( ) ) . await ?;
121126
122127 let namespace = drt. namespace ( args. namespace ) ?;
123- let component = namespace. component ( "count" ) ?;
128+ // The metrics aggregator operates independently of any model,
129+ // hence the model name is set to None.
130+ let component = namespace. component ( "count" , None ) ?;
124131
125132 // Create unique instance of Count
126133 let key = format ! ( "{}/instance" , component. etcd_root( ) ) ;
@@ -131,7 +138,7 @@ async fn app(runtime: Runtime) -> Result<()> {
131138 . await
132139 . context ( "Unable to create unique instance of Count; possibly one already exists" ) ?;
133140
134- let target_component = namespace. component ( & config. component_name ) ?;
141+ let target_component = namespace. component ( & config. component_name , config . model_name . clone ( ) ) ?;
135142 let target_endpoint = target_component. endpoint ( & config. endpoint_name ) ;
136143
137144 let service_path = target_endpoint. path ( ) ;
0 commit comments