Skip to content

Commit 742f88f

Browse files
authored
[task] fix: replace DataArguments with MyDataArguments and remove duplicated step2token saving (#189)
### What does this PR do? Replace DataArguments with MyDataArguments and remove duplicated step2token saving > Add **concise** overview of what this PR aims to achieve or accomplish. Reference related GitHub issues and PRs that help with the review. ### Checklist Before Starting - [x] Search for similar PRs. Paste at least one query link here: ... - [x] Format the PR title as `[{modules}] {type}: {description}` (This will be checked by the CI) - `{modules}` include `misc`, `ci`, `config`, `docs`, `core`, `data`, `dist`, `omni`, `logging`, `model`, `optim`, `ckpt`, `release`, `task`, ` - If this PR involves multiple modules, separate them with `,` like `[megatron, torch, liger-kernals,fsdp, doc]` - `{type}` is in `feat`, `fix`, `refactor`, `chore`, `test` - If this PR breaks any API (CLI arguments, config, function signature, etc.), add `[BREAKING]` to the beginning of the title. - Example: `[BREAKING][fsdp, torch, liger-kernals] feat: dynamic batching` ### Test > For changes that can not be tested by CI (e.g., algorithm implementation, new model support), validate by experiment(s) and show results like training curve plots, evaluation results, etc. ### API and Usage Example > Demonstrate how the API changes if any, and provide usage example(s) if possible. ```python # Add code snippet or script demonstrating how to use this ``` ### Design & Code Changes > Demonstrate the high-level design if this PR is complex, and list the specific changes. ### Checklist Before Submitting > [!IMPORTANT] > Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review. - [x] Read the [Contribute Guide](https://github.com/ByteDance-Seed/VeOmni/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/ByteDance-Seed/VeOmni/blob/main/CONTRIBUTING.md?plain=1#L22): `make commit && make style && make quality` - [x] Add / Update [the documentation](https://github.com/ByteDance-Seed/VeOmni/blob/main/docs). - [x] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/ByteDance-Seed/VeOmni/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ...
1 parent 47a1f63 commit 742f88f

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

tasks/omni/train_qwen_vl.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class MyDataArguments(DataArguments):
9191
@dataclass
9292
class Arguments:
9393
model: "ModelArguments" = field(default_factory=ModelArguments)
94-
data: "DataArguments" = field(default_factory=DataArguments)
94+
data: "MyDataArguments" = field(default_factory=MyDataArguments)
9595
train: "MyTrainingArguments" = field(default_factory=MyTrainingArguments)
9696

9797

@@ -438,13 +438,6 @@ def main():
438438
},
439439
}
440440
Checkpointer.save(args.train.save_checkpoint_path, state, global_steps=global_step)
441-
if args.train.global_rank == 0:
442-
helper.save_step2token(
443-
args.train.step2token_path,
444-
consumed_tokens=train_metrics["consume_tokens(B)"],
445-
global_step=global_step,
446-
save_checkpoint_path=save_checkpoint_path,
447-
)
448441
dist.barrier()
449442
logger.info_rank0(f"Distributed checkpoint saved at {save_checkpoint_path} successfully!")
450443

@@ -465,13 +458,6 @@ def main():
465458
},
466459
}
467460
Checkpointer.save(args.train.save_checkpoint_path, state, global_steps=global_step)
468-
if args.train.global_rank == 0:
469-
helper.save_step2token(
470-
args.train.step2token_path,
471-
consumed_tokens=train_metrics["consume_tokens(B)"],
472-
global_step=global_step,
473-
save_checkpoint_path=save_checkpoint_path,
474-
)
475461
dist.barrier()
476462
logger.info_rank0(f"Distributed checkpoint saved at {save_checkpoint_path} successfully!")
477463

0 commit comments

Comments
 (0)