Skip to content

Commit

Permalink
There is already a condition check within the function. This outer on…
Browse files Browse the repository at this point in the history
…e is not necessary

Co-authored-by: NanoCode012 <kevinvong@rocketmail.com>
  • Loading branch information
winglian and NanoCode012 authored Aug 16, 2024
1 parent 3b22fb8 commit 7f59dac
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/axolotl/utils/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,7 @@ def prepare_optim_env(cfg):
stage = deepspeed_config.get("zero_optimization", {}).get("stage", None)
setup_deepspeed_env(cfg, stage=stage)

if cfg.torch_compile:
setup_torch_compile_env(cfg)
setup_torch_compile_env(cfg)

if (cfg.bf16 == "auto" and is_torch_bf16_gpu_available()) or cfg.bf16 is True:
os.environ["ACCELERATE_MIXED_PRECISION"] = "bf16"
Expand Down

0 comments on commit 7f59dac

Please sign in to comment.