maxent_grpo.training.runtime.deps¶
Dependency loading utilities used by the training runtime.
Functions
|
Return True when lightweight dependency stubs are allowed. |
|
Install a lightweight accelerate stub for tests. |
|
Install a lightweight torch stub so imports can succeed in tests. |
|
Construct a DeepSpeedPlugin from Accelerate env/config when available. |
Return TRL's prepare_deepspeed helper when available. |
|
Public wrapper for DeepSpeed plugin creation. |
|
|
Return accelerate.Accelerator or raise a helpful RuntimeError. |
|
Return |
|
Return a DeepSpeed module import or raise a contextual RuntimeError. |
|
Return the torch module or raise a helpful RuntimeError. |
|
Return (PreTrainedModel, PreTrainedTokenizer) with clear failure messages. |
- maxent_grpo.training.runtime.deps.maybe_create_deepspeed_plugin()[source]¶
Public wrapper for DeepSpeed plugin creation.
- Return type:
Any | None
- maxent_grpo.training.runtime.deps.get_trl_prepare_deepspeed()[source]¶
Return TRL’s prepare_deepspeed helper when available.
- Return type:
Any | None
- maxent_grpo.training.runtime.deps.require_accelerator(context)[source]¶
Return accelerate.Accelerator or raise a helpful RuntimeError.
- maxent_grpo.training.runtime.deps.require_dataloader(context)[source]¶
Return
torch.utils.data.DataLoaderwith a descriptive error on failure.
- maxent_grpo.training.runtime.deps.require_deepspeed(context, module='deepspeed')[source]¶
Return a DeepSpeed module import or raise a contextual RuntimeError.
- Parameters:
- Return type: