chore: refactor if condition
This commit is contained in:
@@ -452,8 +452,10 @@ class TrainerBuilderBase(abc.ABC):
|
|||||||
optim_args = self.cfg.optim_args
|
optim_args = self.cfg.optim_args
|
||||||
training_args_kwargs["optim_args"] = optim_args
|
training_args_kwargs["optim_args"] = optim_args
|
||||||
|
|
||||||
if self.cfg.optimizer == "adamw_anyprecision":
|
if (
|
||||||
if Path(self.cfg.torchdistx_path).exists():
|
self.cfg.optimizer == "adamw_anyprecision"
|
||||||
|
and Path(self.cfg.torchdistx_path).exists()
|
||||||
|
):
|
||||||
sys.path.append(self.cfg.torchdistx_path)
|
sys.path.append(self.cfg.torchdistx_path)
|
||||||
importlib.import_module("torchdistx")
|
importlib.import_module("torchdistx")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user