Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify keys #31

Merged
merged 2 commits into from
Dec 14, 2023
Merged

modify keys #31

merged 2 commits into from
Dec 14, 2023

Conversation

gitttt-1234
Copy link
Collaborator

@gitttt-1234 gitttt-1234 commented Dec 8, 2023

Summary by CodeRabbit

  • New Features

    • Enhanced data pipeline to include "centroid" information for improved instance cropping.
  • Bug Fixes

    • Fixed inconsistencies in data keys used across the pipeline and tests.
  • Tests

    • Updated tests to reflect changes in data structure, ensuring "centroid" data is correctly shaped and integrated.

Copy link
Contributor

coderabbitai bot commented Dec 8, 2023

Walkthrough

The changes across the files indicate a refactoring in the data handling for instance cropping in a neural network pipeline. The key "instances" and "centroids" are being popped from the source data and replaced with "centroid" in the output, suggesting a shift to single-instance processing. Additional keys related to bounding boxes and images are removed, while a new key for "confidence_maps" is introduced, hinting at a change in the data structure and processing strategy.

Changes

File Path Change Summary
.../instance_cropping.py Modified logic to pop "instances" and "centroids" and add "centroid" to the output.
.../pipelines.py Keys "centroids" and "instance" replaced with "centroid"; "instance_bbox" and "instance_image" removed; "confidence_maps" added.
tests/data/test_instance_cropping.py Renamed "centroids" to "centroid" and added an assertion for "centroid" shape.
tests/data/test_pipelines.py Replaced "centroids" with "centroid" and added "frame_idx" and "video_idx" keys in tests.

Poem

🐇 In the code where tensors flow,
🌟 Changes come and old keys go.
"Centroids" pop, "centroid" stands,
A single instance, shaped by hands.


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Copy link

codecov bot commented Dec 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c590ae5) 99.78% compared to head (ab12e4f) 99.78%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #31   +/-   ##
=======================================
  Coverage   99.78%   99.78%           
=======================================
  Files          19       19           
  Lines         949      949           
=======================================
  Hits          947      947           
  Misses          2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gitttt-1234 gitttt-1234 requested a review from talmo December 9, 2023 06:53
@gitttt-1234 gitttt-1234 marked this pull request as ready for review December 9, 2023 06:53
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between c590ae5 and ab12e4f.
Files selected for processing (4)
  • sleap_nn/data/instance_cropping.py (2 hunks)
  • sleap_nn/data/pipelines.py (2 hunks)
  • tests/data/test_instance_cropping.py (2 hunks)
  • tests/data/test_pipelines.py (5 hunks)
Files skipped from review due to trivial changes (2)
  • sleap_nn/data/pipelines.py
  • tests/data/test_instance_cropping.py
Additional comments: 1
sleap_nn/data/instance_cropping.py (1)
  • 97-97: The addition of the "centroid" key to the yielded example is consistent with the PR's objective. Verify that the new key is properly handled in all places where the modified data structure is used.

The addition of the "centroid" key to the yielded example has been verified and is properly integrated in the tests and data pipeline code. No further issues found.

@gitttt-1234 gitttt-1234 merged commit 03b404d into main Dec 14, 2023
@gitttt-1234 gitttt-1234 deleted the divya/modify-keys branch December 14, 2023 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants