ms-swift
ms-swift copied to clipboard
inference的时候如何指定remove_unused_columns为false
- 如果推理训练时候用到的验证集,可以保留没用到的columns
# use validation set in training settings
swift infer \
--model $model \
--load_data_args true \
--max_batch_size $max_batch_size \
--dataset_num_proc $NPROC_PER_NODE \
2>&1 | tee $localhost_ip.infer.log
- 如果inference的时候,使用其他的数据集,似乎没办法指定这个参数,inference的结果里面总是丢掉了我额外添加的字段
# use customized inference dataset
val_dataset=XXX.json
swift infer \
--model $model \
--val_dataset $val_dataset \
--load_data_args false \
--max_batch_size $max_batch_size \
--dataset_num_proc $NPROC_PER_NODE \
2>&1 | tee $localhost_ip.infer.log
- 我已经修改了源代码,把所有的
remove_unused_columns: bool = False这种地方,全都改成了false,但还是没有把我json里面其他的字段保留下来 - 请问如何修改呢?谢谢!
This issue has been inactive for over 3 months and will be automatically closed in 7 days. If this issue is still relevant, please reply to this message.