Skip to content

Commit

Permalink
fix: str should be used not int when setting env variables (huggi…
Browse files Browse the repository at this point in the history
  • Loading branch information
statelesshz authored Jun 6, 2024
1 parent 9ef93fc commit 9e9679c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformers/trainer_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def enable_full_determinism(seed: int, warn_only: bool = False):
os.environ["CUDA_LAUNCH_BLOCKING"] = "1"
os.environ["CUBLAS_WORKSPACE_CONFIG"] = ":16:8"
# The environment variable required to enable deterministic mode on Ascend NPUs.
os.environ["ASCEND_LAUNCH_BLOCKING"] = 1
os.environ["HCCL_DETERMINISTIC"] = 1
os.environ["ASCEND_LAUNCH_BLOCKING"] = "1"
os.environ["HCCL_DETERMINISTIC"] = "1"
torch.use_deterministic_algorithms(True, warn_only=warn_only)

# Enable CUDNN deterministic mode
Expand Down

0 comments on commit 9e9679c

Please sign in to comment.