modelscope / modelscope/ms-swift

Qwen3-Reranker 训练数据集格式到底是啥

Open
#9,702 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
15.7k
Forks
1.7k
Avg merge
1d 16h
Merged PRs (30d)
136

Description

Checklist / 检查清单
  • I have searched existing issues, and this is a new bug report. / 我已经搜索过现有的 issues,确认这是一个新的 bug report。
Bug Description / Bug 描述

[WARNING:swift] 👆👆👆There are errors in the dataset, the data will be deleted
[INFO:swift] Traceback (most recent call last):
File "/home/yw/.conda/envs/swift/lib/python3.10/site-packages/swift/dataset/preprocessor/core.py", line 193, in batched_preprocess
self._check_messages(r)
File "/home/yw/.conda/envs/swift/lib/python3.10/site-packages/swift/dataset/preprocessor/core.py", line 71, in _check_messages
assert len(messages) > 0, f'messages: {messages}'
AssertionError: messages: []

[WARNING:swift] 👆👆👆There are errors in the dataset, the data will be deleted
Map (num_proc=8): 100%|█████████████████████████████████████████████████████████████████████████████████████████████████| 3000/3000 [00:00<00:00, 9476.85 examples/s]
[INFO:swift] Dataset filtered, origin length: 3000, filtered dataset length: 0
[rank0]: Traceback (most recent call last):
[rank0]: File "/home/yw/.conda/envs/swift/lib/python3.10/site-packages/swift/cli/sft.py", line 20, in
[rank0]: sft_main()
[rank0]: File "/home/yw/.conda/envs/swift/lib/python3.10/site-packages/swift/pipelines/train/sft.py", line 340, in sft_main
[rank0]: return SwiftSft(args).main()
[rank0]: File "/home/yw/.conda/envs/swift/lib/python3.10/site-packages/swift/pipelines/base.py", line 52, in main
[rank0]: result = self.run()
[rank0]: File "/home/yw/.conda/envs/swift/lib/python3.10/site-packages/swift/ray_utils/base.py", line 168, in wrapper
[rank0]: return func(self, *args, **kwargs)
[rank0]: File "/home/yw/.conda/envs/swift/lib/python3.10/site-packages/swift/pipelines/train/sft.py", line 161, in run
[rank0]: train_dataset, val_dataset = self._prepare_dataset()
[rank0]: File "/home/yw/.conda/envs/swift/lib/python3.10/site-packages/swift/ray_utils/base.py", line 168, in wrapper
[rank0]: return func(self, *args, **kwargs)
[rank0]: File "/home/yw/.conda/envs/swift/lib/python3.10/site-packages/swift/pipelines/train/sft.py", line 107, in _prepare_dataset
[rank0]: train_dataset, val_dataset = self._get_dataset()
[rank0]: File "/home/yw/.conda/envs/swift/lib/python3.10/site-packages/swift/pipelines/train/sft.py", line 81, in _get_dataset
[rank0]: train_dataset, val_dataset = args.load_dataset()
[rank0]: File "/home/yw/.conda/envs/swift/lib/python3.10/site-packages/swift/arguments/base_args/base_args.py", line 351, in load_dataset
[rank0]: train_dataset, val_dataset = load_dataset(
[rank0]: File "/home/yw/.conda/envs/swift/lib/python3.10/site-packages/swift/dataset/loader.py", line 351, in load_dataset
[rank0]: train_dataset, val_dataset = loader.post_process(
[rank0]: File "/home/yw/.conda/envs/swift/lib/python3.10/site-packages/swift/dataset/dataset_meta.py", line 165, in post_process
[rank0]: assert train_sample > 0
[rank0]: AssertionError

文档的格式试了,又来GitHub的Issues中发现不同的格式,试来试去没一种是对的,能不能靠谱一点

How to Reproduce / 如何复现

你们是没人在运维了吗

Additional Information / 补充信息

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dataset handling locations named in the traceback: swift/dataset/preprocessor/core.py and swift/dataset/loader.py, then reproduce the failure with the reported 3,000-example dataset. Determine which Qwen3-Reranker fields produce non-empty messages and confirm that the documented format leaves a nonzero filtered dataset for training.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.