Skip to content

Commit eb6337f

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 22cc155 commit eb6337f

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

applications/ColossalChat/coati/dataset/loader.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,6 @@ def apply_chat_template_and_mask(
359359

360360
system_prompt = "You are a helpful assistant. The assistant first thinks about the reasoning process in the mind and then provides the user with the answer. The reasoning process and answer are enclosed within <think> </think> and<answer> </answer> tags, respectively, i.e., <think> reasoning process here </think><answer> answer here </answer>. Now the user asks you to solve a math problem that involves reasoning. After thinking, when you finally reach a conclusion, clearly output the final answer without explanation within the <answer> </answer> tags, i.e., <answer> 123 </answer>.\n\n"
361361

362-
363-
364362
system_element = {
365363
"role": "system",
366364
"content": system_prompt,

applications/ColossalChat/coati/distributed/consumer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import os
12
from contextlib import nullcontext
23
from typing import Any, Dict, Optional
3-
import os
4+
45
import ray
56
import ray.util.collective as cc
67
import torch
@@ -34,7 +35,7 @@ def __init__(
3435
plugin_config: Dict[str, Any],
3536
microbatch_size: int = 1,
3637
save_interval: int = 100,
37-
save_dir: str = "./model"
38+
save_dir: str = "./model",
3839
):
3940
self.num_producers = num_producers
4041
self.num_episodes = num_episodes

applications/ColossalChat/coati/distributed/grpo_consumer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __init__(
7979

8080
self.policy_loss_fn = PolicyLoss()
8181
self.global_step = 0
82-
if use_wandb and self.rank == 0:
82+
if use_wandb and self.rank == 0:
8383
self.wandb_run = wandb.init(project="GRPO-Test", sync_tensorboard=True)
8484

8585
def setup(self):

0 commit comments

Comments
 (0)