[Core] Add lifecycle hooks for worker extensions (#59463)
Signed-off-by: Dakai An <dakaian108@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: aoshen02 <aoshen@inferact.ai>
This commit is contained in:
co-authored by
Claude Opus 5.5
aoshen02
parent
0fae39a014
commit
de8291e24f
@@ -309,7 +309,10 @@ class ParallelConfig:
|
||||
"""The full name of the worker extension class to use. The worker extension
|
||||
class is dynamically inherited by the worker class. This is used to inject
|
||||
new attributes and methods to the worker class for use in collective_rpc
|
||||
calls."""
|
||||
calls. It may also define `init_worker_extension(self)`, called after
|
||||
device and distributed initialization but before model loading, and
|
||||
`destroy_worker_extension(self)`, called (best-effort) before the worker
|
||||
shuts down."""
|
||||
master_addr: str = "127.0.0.1"
|
||||
"""distributed master address for multi-node distributed
|
||||
inference when distributed_executor_backend is mp."""
|
||||
|
||||
Reference in New Issue
Block a user