# macros Source: https://www.tensorplay.cn/docs/generated/tensorplay.distributed.elastic.utils.macros.html ```python class tensorplay.distributed.elastic.utils.macros ``` Substitution variables usable in worker argument templates. Any ${field} token inside the worker argument list is replaced with the concrete value for the worker being launched. Supported fields are the entries of fields. ```python classmethod substitute(args: list[str], local_rank: str | None = None) → list[str] ``` Replace ${field} tokens in args; unknown tokens are kept. ```python classmethod to_map() → dict[str, str] ``` Current macro values from the running process’ environment.