pub struct DeepSpeedInstaller { /* private fields */ }Expand description
The DeepSpeed installer.
Implementations§
Source§impl DeepSpeedInstaller
impl DeepSpeedInstaller
Sourcepub fn new(config: DeepSpeedConfig) -> Self
pub fn new(config: DeepSpeedConfig) -> Self
Create a new DeepSpeed installer with the given config.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create with default config.
Sourcepub fn rocm_build_env(&self, rocm_env: &RocmEnv) -> Vec<(String, String)>
pub fn rocm_build_env(&self, rocm_env: &RocmEnv) -> Vec<(String, String)>
Get the ROCm environment variables needed for DeepSpeed build.
DeepSpeed auto-detects ROCm when ROCM_HOME is set. The original script sets:
- ROCM_HOME=/opt/rocm
- HIP_PATH=/opt/rocm
- HSA_OVERRIDE_GFX_VERSION
- PYTORCH_ROCM_ARCH
Sourcepub fn build_deps_install_command(&self) -> PipCommand
pub fn build_deps_install_command(&self) -> PipCommand
Construct the pip install command for DeepSpeed dependencies.
Installs packaging, ninja, pydantic, jsonschema, einops.
Sourcepub fn build_install_command(&self) -> PipCommand
pub fn build_install_command(&self) -> PipCommand
Construct the pip install command for DeepSpeed.
The original script uses pip install deepspeed einops with
ROCM_HOME and HIP_PATH set. It does NOT set DS_ACCELERATOR=rocm
as that caused ValueError in newer versions.
Sourcepub fn build_no_deps_command(&self) -> PipCommand
pub fn build_no_deps_command(&self) -> PipCommand
Construct the retry install command with –no-deps.
Used when the primary install fails.
Sourcepub fn build_force_reinstall_command(&self) -> PipCommand
pub fn build_force_reinstall_command(&self) -> PipCommand
Construct the force-reinstall retry command.
Sourcepub fn required_dependencies(&self) -> &[&str]
pub fn required_dependencies(&self) -> &[&str]
Get the list of required dependencies to verify after install.
Auto Trait Implementations§
impl Freeze for DeepSpeedInstaller
impl RefUnwindSafe for DeepSpeedInstaller
impl Send for DeepSpeedInstaller
impl Sync for DeepSpeedInstaller
impl Unpin for DeepSpeedInstaller
impl UnsafeUnpin for DeepSpeedInstaller
impl UnwindSafe for DeepSpeedInstaller
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more