1111from monarch .actor import Actor
1212
1313from forge .controller import Service , ServiceConfig
14- from forge .controller .service_v2 import (
15- Service as ServiceV2 ,
16- ServiceConfig as ServiceConfigV2 ,
17- )
1814
1915logger = logging .getLogger (__name__ )
2016logger .setLevel (logging .DEBUG )
@@ -39,24 +35,3 @@ async def spawn_service(
3935 service = Service (service_cfg , actor_def , * actor_args , ** actor_kwargs )
4036 await service .__initialize__ ()
4137 return service
42-
43-
44- async def spawn_service_v2 (
45- service_cfg : ServiceConfigV2 , actor_def : Type [Actor ], * actor_args , ** actor_kwargs
46- ) -> ServiceV2 :
47- """Spawns a service based on the actor class.
48-
49- Args:
50- service_cfg: Service configuration
51- actor_def: Actor class definition
52- *actor_args: Arguments to pass to actor constructor
53- **actor_kwargs: Keyword arguments to pass to actor constructor
54-
55- Returns:
56- The appropriate service type based on the actor class
57- """
58- # Default to base Service
59- logger .info ("Spawning base Service for %s" , actor_def .__name__ )
60- service = ServiceV2 (service_cfg , actor_def , * actor_args , ** actor_kwargs )
61- await service .__initialize__ ()
62- return service
0 commit comments