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

Refactor grpo dataset #3192

Merged
merged 7 commits into from
Feb 20, 2025
Merged

Conversation

Jintao-Huang
Copy link
Collaborator

No description provided.

Copy link
Contributor

@Yimi81 Yimi81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这一块能改一下吗 python if 'solution' in dataset.features: dataset = dataset.map(lambda x: {'__#solution': x['solution']}, **map_kwargs)
改成如下:

if 'solution' in dataset.features or 'answer' in dataset.features:
       dataset = dataset.map(lambda x: {'__#solution': x['solution'] if 'solution' in dataset.features else x['answer']}, **map_kwargs)

不然对应列名只有question,answer的gsm8k这样的数据集还是报错

@Jintao-Huang
Copy link
Collaborator Author

这一块能改一下吗 python if 'solution' in dataset.features: dataset = dataset.map(lambda x: {'__#solution': x['solution']}, **map_kwargs) 改成如下:

if 'solution' in dataset.features or 'answer' in dataset.features:
       dataset = dataset.map(lambda x: {'__#solution': x['solution'] if 'solution' in dataset.features else x['answer']}, **map_kwargs)

不然对应列名只有question,answer的gsm8k这样的数据集还是报错

这个只需要在 外面做个映射:--columns '{"answer": "solution"}' 这样就好了

@Yimi81
Copy link
Contributor

Yimi81 commented Feb 20, 2025

ok~

@Jintao-Huang Jintao-Huang merged commit b71827a into modelscope:main Feb 20, 2025
1 of 2 checks passed
tastelikefeet added a commit to tastelikefeet/swift that referenced this pull request Feb 21, 2025
…soth_fast_grpo

* commit '8921d9b98310d93f9f111af8859358ee32dce687': (46 commits)
  Support multiple vllms (modelscope#3202)
  update dataset & fix bugs (modelscope#3203)
  support vllm dp (modelscope#3201)
  fix setup.py (modelscope#3198)
  add links (modelscope#3193)
  Refactor grpo dataset (modelscope#3192)
  support r1 dataset (modelscope#3191)
  compat vllm==0.7.2 (modelscope#3083)
  support Knowledge Distillation sampling (modelscope#3185)
  Support GOT_OCR2_hf (modelscope#3182)
  Fix prm in sampler (modelscope#3184)
  fix sampler reaches max_length (modelscope#3180)
  refactor cosine orm (modelscope#3179)
  fix internvl-4b (modelscope#3178)
  Fix lmdeploy branch (modelscope#3145)
  Fix/agent grpo (modelscope#3172)
  fix streaming (modelscope#3176)
  fix max_length error (modelscope#3173)
  Support Agent GRPO (modelscope#3170)
  Fix ovis2 (modelscope#3169)
  ...

# Conflicts:
#	swift/llm/train/tuner.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants