Add curator-to-SFT JSONL converter#62
Open
lfengad wants to merge 1 commit into
Open
Conversation
Add cosmos_framework.scripts.curator_to_sft_jsonl, which converts cosmos-curator splitting-pipeline metas_jsonl output directly into the SFT training JSONL format, applying the same hard filters sft_dataset.py applies silently at train time (duration > 61.0s, per-window frames < 61, optional short-edge) so dataset counts match what training consumes. Emits a sidecar <output>.summary.json with per-reason drop counts and rewrites vision_path relative to the JSONL so datasets stay portable across mounts. Document the path as a new "Create Dataset from a Cosmos-Curator output directory" section in docs/dataset_jsonl.md. Ported from imaginaire4 MR 9217: cosmos3.scripts -> cosmos_framework.scripts, OSS SPDX header, and stale sft_dataset.py line refs corrected to 548-550. Verified: 24/24 tests pass, ruff check/format clean, CLI --help imports. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add cosmos_framework.scripts.curator_to_sft_jsonl, which converts cosmos-curator splitting-pipeline metas_jsonl output directly into the SFT training JSONL format, applying the same hard filters sft_dataset.py applies silently at train time (duration > 61.0s, per-window frames < 61, optional short-edge) so dataset counts match what training consumes. Emits a sidecar .summary.json with per-reason drop counts and rewrites vision_path relative to the JSONL so datasets stay portable across mounts.
Document the path as a new "Create Dataset from a Cosmos-Curator output directory" section in docs/dataset_jsonl.md.
Ported from imaginaire4 MR 9217: cosmos3.scripts -> cosmos_framework.scripts, OSS SPDX header, and stale sft_dataset.py line refs corrected to 548-550.
Verified: 24/24 tests pass, ruff check/format clean, CLI --help imports.
from MR 9217