Add trust_remote_code parameter and remove True

- Introduced a new model parameter `trust_remote_code`
- Set the default value of `trust_remote_code` to `False`
  to enhance security
This commit is contained in:
Yaser Afshar
2024-10-24 15:57:27 -07:00
committed by hiyouga
parent a665ad6178
commit 0943776326
33 changed files with 43 additions and 6 deletions

View File

@@ -129,7 +129,7 @@ def _load_single_dataset(
token=model_args.hf_hub_token,
streaming=data_args.streaming,
num_proc=data_args.preprocessing_num_workers,
trust_remote_code=True,
trust_remote_code=model_args.trust_remote_code,
)
if dataset_attr.num_samples is not None and not data_args.streaming: