Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpt找不到验证集 #6344

Closed
1 task done
nuochenpku opened this issue Dec 16, 2024 · 4 comments
Closed
1 task done

cpt找不到验证集 #6344

nuochenpku opened this issue Dec 16, 2024 · 4 comments
Labels
solved This problem has been already solved

Comments

@nuochenpku
Copy link

Reminder

  • I have read the README and searched the existing issues.

System Info

它ransformers==4.36.1

Reproduction

model

model_name_or_path:models/Qwen2-7B

method

stage: pt
do_train: true
finetuning_type: full
deepspeed: examples/deepspeed/ds_z3_config.json # choices: [ds_z0_config.json, ds_z2_config.json, ds_z3_config.json]

dataset

dataset: pretrain/cpt/saves/qwen2-7b/cpt_v1/
eval_dataset: openmath_test,clrs_test
cutoff_len: 4096
template: qwen
overwrite_cache: true
preprocessing_num_workers: 64
tokenized_path: pretrain/cpt/saves/qwen2-7b/cpt_v1/

output

output_dir: output/saves/qwen2-7b/cpt_v1
logging_steps: 10
save_steps: 2000
plot_loss: true
overwrite_output_dir: true

train

per_device_train_batch_size: 4
gradient_accumulation_steps: 8
learning_rate: 5.0e-6
num_train_epochs: 3.0
lr_scheduler_type: cosine
warmup_ratio: 0.1
bf16: true
ddp_timeout: 180000000

eval

per_device_eval_batch_size: 4
eval_strategy: steps
eval_steps: 500

Expected behavior

上述命令,在运行时报错: File "/opt/conda/lib/python3.10/site-packages/transformers/trainer.py", line 419, in init
[rank4]: raise ValueError(
[rank4]: ValueError: You have set args.eval_strategy to steps but you didn't pass an eval_dataset to Trainer. Either set args.eval_strategy to no or pass an eval_dataset.

可是在sh文件中已经指定了eval_dataset

Others

No response

@github-actions github-actions bot added the pending This problem is yet to be addressed label Dec 16, 2024
@Geministudents
Copy link

有bug,tokenized_path把这个参数去掉

@nuochenpku
Copy link
Author

可是我tokenized——path已经是我事先tokenized 过的,直接去掉,也会自动load我之前tokenized id么?

@Geministudents
Copy link

那个只是针对大数据集进行个预处理,你不加那个参数就是在训练的开始前处理一下,不影响的,反正我刚才出现这个问题的时候就把这个参数去除就行了

@hiyouga
Copy link
Owner

hiyouga commented Dec 17, 2024

预处理时候也需要指定 eval_dataset

@hiyouga hiyouga closed this as completed Dec 17, 2024
@hiyouga hiyouga added solved This problem has been already solved and removed pending This problem is yet to be addressed labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved This problem has been already solved
Projects
None yet
Development

No branches or pull requests

3 participants