Auto Policy

class parallelformers.policies.base.auto.AutoPolicy[source]

Bases: object

Class for finds automatically appropriate policies for the current model

get_policy(model: torch.nn.modules.module.Module) Optional[List[parallelformers.policies.base.policy.Policy]][source]

Find appropriate policies for the current model

Parameters

model (nn.Module) – model to parallelize

Returns

appropriate policies or none

Return type

Union[List[Policy], None]

static available()[source]

Dictionary of available models and policies