update data processors

Former-commit-id: 04b138cbcb8b9a72e4bbda6c65843bb459e525e7
This commit is contained in:
hiyouga
2024-06-07 04:15:40 +08:00
parent 07f33e7641
commit 8c4c2e580c
6 changed files with 190 additions and 139 deletions

View File

@@ -72,7 +72,7 @@ def main():
elif command == Command.EXPORT:
export_model()
elif command == Command.TRAIN:
disable_torchrun = os.environ.get("DISABLE_TORCHRUN", "0").lower() in ["true", "1"]
disable_torchrun = os.environ.get("TORCHRUN_DISABLED", "0").lower() in ["true", "1"]
if disable_torchrun and get_device_count() > 1:
logger.warning("`torchrun` cannot be disabled when device count > 1.")
disable_torchrun = False