add jabs-cli compute-features, deprecate jabs-features#381
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new jabs-cli compute-features subcommand to compute and cache features from a pose file, registers it in the main CLI, updates IdentityFeatures to accept Path inputs for source_file, and begins deprecating the legacy jabs-features script.
Changes:
- Added
compute-featuresClick subcommand for feature computation/caching with options for window sizes, distance units, pose-hash cache layout, and cache format. - Registered the new subcommand in
jabs-cli. - Began deprecating
jabs-featuresby emitting a stderr warning and simplifying its CLI setup; updatedIdentityFeaturestyping to acceptPath.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/jabs/scripts/generate_features.py | Emits deprecation warning directing users to jabs-cli compute-features and removes unused script-name helper. |
| src/jabs/scripts/cli/compute_features.py | New compute-features Click command implementing feature computation and cache writing. |
| src/jabs/scripts/cli/cli.py | Registers compute-features in the main CLI command group. |
| src/jabs/feature_extraction/features.py | Broadens IdentityFeatures constructor typing to accept Path for source_file. |
Comments suppressed due to low confidence (1)
src/jabs/scripts/cli/compute_features.py:52
--fpsshould be validated as a positive integer (currently any int is accepted). Consider usingclick.IntRange(min=1)to prevent values like 0 or negative FPS from reaching feature computation.
@click.option(
"--fps",
type=int,
default=30,
show_default=True,
help="Frames per second to use for feature calculation.",
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ute_window_features cache-load path
bergsalex
approved these changes
May 19, 2026
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.
This pull request introduces a new CLI command for computing and caching JABS features, modernizes argument types, and begins deprecating the old feature generation script. The most important changes are summarized below:
New CLI Command for Feature Computation:
compute-featurescommand to the CLI, implemented incompute_features.py, which provides a robust and user-friendly interface for computing and caching features from pose files. This includes options for window sizes, distance units, cache format, and pose hash handling.compute-featurescommand in the main CLI by importing and adding it to the command group incli.py. [1] [2]Type and Interface Improvements:
IdentityFeaturesclass constructor to acceptsource_fileas either astror aPathDeprecation of Old Feature Generation Script:
generate_features.pyto print a deprecation warning directing users to use the newjabs-cli compute-featurescommand, and simplified its argument parsing.