> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://fr.nvidia-localization.ferndocs.com/fr/nemo/rl/latest/nemo-rl-models-policy-dtensor-policy-worker-v2/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fr.nvidia-localization.ferndocs.com/_mcp/server. # nemo\_rl.models.policy.dtensor\_policy\_worker\_v2 ## Contenu du Module ### Classes | Nom | Description | | ---------------------------------------------------------------------------------------- | ----------- | | [`DTensorPolicyWorkerV2`](#nemorlmodelspolicydtensorpolicyworkerv2dtensorpolicyworkerv2) | Aucun | ### API ```python class nemo_rl.models.policy.dtensor_policy_worker_v2.DTensorPolicyWorkerV2(config: nemo_rl.models.policy.PolicyConfig, tokenizer: transformers.AutoTokenizer, processor: typing.Optional[transformers.AutoProcessor] = None, weights_path: typing.Optional[str] = None, optimizer_path: typing.Optional[str] = None, init_optimizer: bool = True, init_reference_model: bool = True, **kwargs: typing.Any) ``` ```python __repr__() -> str ``` Personnalise le préfixe de l'acteur dans les journaux Ray. Cela facilite l'identification du worker produisant des messages de journal spécifiques. ```python _apply_temperature_scaling(logits: torch.Tensor) -> torch.Tensor ``` ```python init_collective( ip: str, port: int, world_size: int ) -> None ``` Initialiser la communication collective. ```python is_alive() -> bool ``` ```python reset_peak_memory_stats() -> None ``` ```python get_gpu_info() -> dict[str, typing.Any] ``` Retourne des informations sur le GPU utilisé par ce worker. \[... rest of the document continues with the same translation pattern ...]