feat: multi-model multi-label classify-warc output#31
Merged
Conversation
`classify-warc` now scores each record against any number of fasttext models in one pass, and any number of labels per model, instead of one label from one model. `--model-repo`/`--model-file`/`--labels` are parallel-list flags; `*` (the default for `--labels`) expands to every label of that model via `model.get_labels()`. Output columns are `score_<label>` for a single model and `score_m<idx>_<label>` for multiple, so two models can share a label name (e.g. both GneissWeb classifiers emit `__label__cc`) without colliding. Also: `--overwrite` to replace an existing output instead of failing; `--resume-from-output` validates the prior CSV's header is byte-equal to the new run's schema (with a structured added/removed diff on mismatch); per-label stats land in the sidecar as `score.<column>.*`.
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.
classify-warcnow scores each record against any number of fasttext models in one pass, and any number of labels per model, instead of one label from one model.--model-repo/--model-file/--labelsare parallel-list flags;*(the default for--labels) expands to every label of that model viamodel.get_labels(). Output columns arescore_<label>for a single model andscore_m<idx>_<label>for multiple, so two models can share a label name (e.g. both GneissWeb classifiers emit__label__cc) without colliding.Also:
--overwriteto replace an existing output instead of failing;--resume-from-outputvalidates the prior CSV's header is byte-equal to the new run's schema (with a structured added/removed diff on mismatch); per-label stats land in the sidecar asscore.<column>.*.