We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6decc6 commit db95da4Copy full SHA for db95da4
verl/trainer/config.py
@@ -43,11 +43,19 @@ class DataConfig:
43
rollout_batch_size: int = 512
44
val_batch_size: int = -1
45
format_prompt: Optional[str] = None
46
+ format_prompt_path: Optional[str] = None
47
shuffle: bool = True
48
seed: int = 1
49
max_pixels: int = 4194304
50
min_pixels: int = 262144
51
52
+ def post_init(self):
53
+ if self.format_prompt is None and self.format_prompt_path is not None:
54
+ if os.path.exists(self.format_prompt_path):
55
+ self.format_prompt_path = os.path.abspath(self.format_prompt_path)
56
+ with open(self.format_prompt_path, "r", encoding="utf-8") as f:
57
+ self.format_prompt = f.read()
58
+
59
60
@dataclass
61
class AlgorithmConfig:
0 commit comments