pub struct MegatronConfig {
pub method: InstallMethod,
pub python_bin: String,
pub force_reinstall: bool,
pub dry_run: bool,
pub install_dir: Option<PathBuf>,
}Expand description
Configuration for the Megatron-LM installer.
Fields§
§method: InstallMethodInstallation method.
python_bin: StringPython binary to use.
force_reinstall: boolWhether to force reinstall.
dry_run: boolWhether to run in dry-run mode.
install_dir: Option<PathBuf>Installation directory (defaults to $HOME/Megatron-LM).
Implementations§
Source§impl MegatronConfig
impl MegatronConfig
Sourcepub fn install_dir(&self) -> PathBuf
pub fn install_dir(&self) -> PathBuf
Get the installation directory path.
The original script uses $HOME/Megatron-LM as primary,
with $HOME/.mlstack/src/Megatron-LM as fallback.
Sourcepub fn fallback_install_dir(&self) -> PathBuf
pub fn fallback_install_dir(&self) -> PathBuf
Get the fallback installation directory.
Trait Implementations§
Source§impl Clone for MegatronConfig
impl Clone for MegatronConfig
Source§impl Debug for MegatronConfig
impl Debug for MegatronConfig
Auto Trait Implementations§
impl Freeze for MegatronConfig
impl RefUnwindSafe for MegatronConfig
impl Send for MegatronConfig
impl Sync for MegatronConfig
impl Unpin for MegatronConfig
impl UnsafeUnpin for MegatronConfig
impl UnwindSafe for MegatronConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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