Commit 4edc688
Only load data on main process (huggingface#1255)
* fix: only load data on main process
* define is_main_process once
Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
* avoid re-initializing PartialState on train dataset check
Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
* avoid re-initializing PartialState on eval dataset check
Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
* process dataset on main first to take advantage of caching
* fix typo in docs
* use decorator to manage state
* Revert "fix typo in docs"
This reverts commit 0880a188812a698f7106853245ce1ba96a036831.
* Revert "Revert "fix typo in docs""
This reverts commit ff7ee33fbeedcd0032b728d86a17cfcb10e43f9b.
* Revert "use decorator to manage state"
This reverts commit 7ac7a45949f621941fedc522f0d2ca7b29367c3a.
* use is_local_main_process instead of is_main_process
* fix: use context manager instead of attribute
Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
* Update trl/trainer/sft_trainer.py
Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
---------
Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>1 parent 29d439a commit 4edc688
2 files changed
+27
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
276 | 263 | | |
277 | 264 | | |
278 | 265 | | |
| |||
283 | 270 | | |
284 | 271 | | |
285 | 272 | | |
286 | | - | |
287 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
288 | 291 | | |
289 | 292 | | |
290 | 293 | | |
| |||
0 commit comments